Q:

Opposite of os.path.commonprefix

What's the opposite of os.path.commonprefix? I have two paths and I want the non-overlapping path, e.g.:
>>> p1 = '/Users/foo/something'
>>> p2 = '/Users/foo/something/else/etc'
>>> print somefunction([p1, p2])
'/else/etc'

A:

>>> p1 = '/Users/foo/something'
>>> p2 = '/Users/foo/something/else/etc'
>>> os.path.relpath(p2, start=p1)
'else/etc'

The correct answer is 'else/etc' and not '/else/etc'.
If you are in p1 and type cd /else/etc you wouldn't land in p2, but somewhere else.
os.path.join(p1, 'else/etc') gives you p2 again.

