随笔分类 - FileInput
摘要:fileinput模块可以对一个或多个文件中的内容进行迭代、遍历等操作,的open函数是对一个文件进行读写操作;fileinput.input()函数生成一个迭代器,遇到大文件的读取时不会占用太大的内存;fileinput对文件进行循环遍历,格式化输出,查找、替换等操作,还能获取每一行的行号等等 d
阅读全文
摘要:def input(files=None, inplace=False, backup="", bufsize=0, mode="r", openhook=None): """Return an instance of the FileInput class, which can be iterat
阅读全文