PyDocs

Nav

File and Directory Access

join

os.path

function (source)
  • join(path, /, *paths)
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded.  An empty last part will result in a path that
ends with a separator.
Changed in 3.6
  • 3.6: Accepts a path-like object for path and paths.
1 Example
>>> os.path.join('/home/foo', 'bar')
'/home/foo/bar'
>>> os.path.join('/home/foo', '/home/bar')
'/home/bar'
from the Python docs
See Also
No see-alsos for os.path/join
0 Notes
No notes for join