import os
def traverse_dir(path):
for root, dirs, files in os.walk(path):
for dir in dirs:
dir_path = os.path.join(root, dir)
print(dir_path)
traverse_dir(dir_path)
if __name__ == '__main__':
path = "D:超编人脸"
traverse_dir(path)