python读取文件指定行内容

import linecache
text=linecache.getline(r'C:\Users\Administrator\Desktop\SourceCodeofMongoRedis\chapter_5\generate_string.py',10)
第十行内容为# info = '''1000001 王小小'''

 

相关文章:

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