会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
花式吹牛逼
博客园
首页
新随笔
联系
管理
订阅
2018年2月21日
删除同目录下面txt文件(利用os,fnmacth模块)
摘要: import osimport fnmatchfor filename in os.listdir('.'): if fnmatch.fnmatch(filename, '*.txt'): # 匹配模式为星号,表示任意的字符 os.remove(filename)
阅读全文
posted @ 2018-02-21 08:50 花式吹牛逼
阅读(155)
评论(2)
推荐(0)
编辑