code: def rec_split_path(path):
      '''将一个路径进行分隔, 分别得到每父母的绝对路径及目录名'''
      if len(path) > 1 and path.endswith('/'):
          path = path[:-1]
      if '/' not in path:
          return [path,]
      result = []
      while path != '/':
          parent, name = os.path.split(path)
          result.append((path, name))
          path = parent
      result.append(('/', '/'))
      result.reverse()
      return resulf rec_split_path(path):
      '''将一个路径进行分隔, 分别得到每父母的绝对路径及目录名'''
      if len(path) > 1 and path.endswith('/'):
          path = path[:-1]
      if '/' not in path:
          return [path,]
      result = []
      while path != '/':
          parent, name = os.path.split(path)
          result.append((path, name))
          path = parent
      result.append(('/', '/'))
      result.reverse()
      return result
docs: 将一个路径进行分隔, 分别得到每父母的绝对路径及目录名