I want to use os.path
to safely remove the first element from a given path:
/foo/bar/something
/foo/something
/foo/foo
So, if foo is in the the path, I want to remove it. I know I could do this regex but I would rather use os.path
if possible.
However, I've been through the doc page and can't see how it offers any methods to do this.
Is there a way, or should I just regex it?