code: def path_iter(path):
      
      parts = []
      while path:
          path, item = os.path.split(path)
          if item:
              parts.append(item)
      return reversed(parts)
docs: Returns an iterator over all the file & folder names in a path.