会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
TG@im6622
博客园
首页
新随笔
联系
订阅
管理
2026年3月6日
Python遍历文件夹及子文件夹
摘要: Python遍历文件夹及子文件夹: import os # 列出一个文件夹里的所有文件,文件夹 def scan_dir_files(files): if os.path.exists(files):# os.path.exists() 判断文件或文件夹是否存在 lst = os.listdir(f
阅读全文
posted @ 2026-03-06 15:20 tg_im6622
阅读(26)
评论(0)
推荐(0)
公告