python函数随记

python读文件python file = open('E:\\test\\tr2.txt') while 1: line = file.readline() #读取每一行 if not line: break print line file.close() 更简单的: fh = open('c:\\autoexec.bat') for line in
相关文章
相关标签/搜索