os.path — Common pathname manipulations — Python 3.10.2 ...
docs.python.org › 3 › libraryMar 12, 2022 · os.path. relpath (path, start=os.curdir) ¶ Return a relative filepath to path either from the current directory or from an optional start directory. This is a path computation: the filesystem is not accessed to confirm the existence or nature of path or start. On Windows, ValueError is raised when path and start are on different drives.