[Python]打印指定目录下所有子目录 import os for root,dirs,files in os.walk(r"/home/os-hy01"): for dir in dirs: print(dir) --2020-03-16--