摘要: 用python实现excel中查找指定字符的行信息 strr # 字符串 or 字符 filename # 文件名路径 with open(filename,'r') as fp: for line in fp: if strr in line: print (line.rows) 将会输出exce 阅读全文
posted @ 2020-12-07 17:47 yongqi-911 阅读(3145) 评论(0) 推荐(1) 编辑
摘要: python 获取一个文件夹内(包括子文件夹)所有文件的名字和路径 import os dir = "e:\\" for root, dirs, files in os.walk(dir): for file in files: print os.path.join(root,file) 1 2 3 阅读全文
posted @ 2020-12-07 17:45 yongqi-911 阅读(3383) 评论(0) 推荐(0) 编辑