parameters: (a, *p)
return_statement: return path
docstring: Join two or more pathname components, inserting '/' as needed.
      If any component is an absolute path, all previous path components
      will be discarded.
docstring_summary: Join two or more pathname components, inserting '/' as needed.
      If any component is an absolute path, all previous path components
      will be discarded.
docstring_tokens: Join two or more pathname components inserting / as needed . If any component is an absolute path all previous path components will be discarded .
function: def join(a, *p):
      """Join two or more pathname components, inserting '/' as needed.
      If any component is an absolute path, all previous path components
      will be discarded."""
      path = a
      for b in p:
          if b.startswith('/'):
              path = b
          elif path == '' or path.endswith('/'):
              path +=  b
          else:
              path += '/' + b
      return path
function_tokens: def join ( a , * p ) : path = a for b in p : if b . startswith ( '/' ) : path = b elif path == '' or path . endswith ( '/' ) : path += b else : path += '/' + b return path