from itertools import islice
with open(“1.txt") as f:
    for a in islice(f,0,2):
        print(a)

 

相关文章:

  • 2021-11-16
  • 2022-02-24
  • 2022-02-19
  • 2021-08-04
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
相关资源
相似解决方案