Tag Archives: 文本文件

python处理文本文件内容专题

1.读取一个文本文件之后得到里面出现最多的关键字的代码如下:
from time import time
from operator import itemgetter
def test():
# 取 10 个,有需要可以修改, 及定义读取的文件 test.txt
iList = 10
strFil[......]

继续阅读

Posted in python 基础, 文件处理 | Tagged | Leave a comment