code: def splitpath(path):
      
      c = []
      head, tail = os.path.split(path)
      while tail:
          c.insert(0, tail)
          head, tail = os.path.split(head)
      return c
docs: Split a path in its components.