python pathlib 遍历目录下的文件 constant007 2021-10-28 507 阅读1分钟 #遍历目录下的文件 from pathlib import Path r=Path.cwd() y=Path.iterdir(r) for i in y: print(i) for i in r.iterdir()