def path_tail(apath, bpath):
 position = bpath.find(apath)
 if (position != 0):
  return ''
 rposition = (position + len(apath))
 result = bpath[rposition:]
 if (not result.startswith('/')):
  result = ('/' + result)
 return result

def path_tail ( apath , bpath ) : position = bpath . find ( apath ) if ( position != 0 ) : return '' rposition = ( position + len ( apath ) ) result = bpath [ rposition : ] if ( not result . startswith ( '/' ) ) : result = ( '/' + result ) return result
given two paths .