from pathlib import Path


def is_same_path(left: str | Path, right: str | Path) -> bool:
    """Check if the two paths are the same"""
    return Path(left).expanduser().resolve() == Path(right).expanduser().resolve()