from itertools import islice f=open("pyhpd.txt") for a in islice(f,2,6): print(a)
python读取文件特定的行数
原文:https://www.cnblogs.com/liuys635/p/12843544.html