os.path - merge paths with python, from /a/b/c + c/d to /a/b/c/d -
in python, os.path.join
, can join directories paths
import os os.path.join('/usr','opt', 'bin') '/usr/opt/bin'
how can merge 2 path ?
from
/a/b/c + c/d
get
/a/b/c/d
if sure paths of form give example for,
os.path.join(os.path.split(p1)[0], p2)
would it.
Comments
Post a Comment