datafile.txt #文件 Man: this is the right room for an argument. Other Man: I've told you once. Man: No you haven't Other Man: Yes, I have. (pause) Man: When? Other Man: Just now. Man: No you didn't Other Man: Yes I did. Man: You didn't Other Man: I'm…
参考网络上代码编辑而成,无技术含量,可自行定制: 目前亲测有效,若有待完善之处,还望指出! 强调:将此统计py脚本放置项目的根目录下执行即可. 1.遍历文件,递归遍历文件夹中的所有 def getFile(basedir): global filelists for parent,dirnames,filenames in os.walk(basedir): #for dirname in dirnames: # getFile(os.path.join(parent,dirname)) #递归…