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

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -