import os
walks = os.walk(r"D:\Project\Study\python\TestFile\demo")
for(root,dirs,files) in walks:
print(root)
for file in files:
print("\t",file)
python-遍历目录
最新推荐文章于 2024-07-15 20:51:08 发布
import os
walks = os.walk(r"D:\Project\Study\python\TestFile\demo")
for(root,dirs,files) in walks:
print(root)
for file in files:
print("\t",file)
442
1072
1321
1714

被折叠的 条评论
为什么被折叠?