from itertools import islice
start = 1  # 跳过第一行idx=0,从idx=1开始读取文件
with codecs.open('data.json', encoding='utf-8') as fr:    
    for idx, line in enumerate(islice(fr, start, None)):
        print idx, line

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-01-08
  • 2022-01-10
猜你喜欢
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案