(path: str)
return os.path.normpath(path).replace("//", "/")
Normalize a path

    Python's os.path.normpath() doesn't handle some cases:
    // -> //
    //..// -> //
    //..//..// -> ///
Normalize a path
Normalize a path
def normpath(path: str) -> str:
    """Normalize a path

    Python's os.path.normpath() doesn't handle some cases:
    // -> //
    //..// -> //
    //..//..// -> ///
    """
    return os.path.normpath(path).replace("//", "/")
def normpath ( path : str ) -> str : return os . path . normpath ( path ) . replace ( "//" , "/" )