Python 从指定行读取文件

from itertools import islice with open('xxx', 'r') as f: for line in islice(f.readlines(), 1, None): print(line) 上述代码能够实现从第二行(下标为1)打印数据html 转载于:https://www.cnblogs.com/wangmantou/p/906611
相关文章
相关标签/搜索