python read the file contents of the specified line

python read the file contents of the specified line

import linecache
text=linecache.getline(r'C:\Users\Administrator\Desktop\SourceCodeofMongoRedis\chapter_5\generate_string.py',10)
The tenth line content # info = '' '1000001 little king' ''

 

Guess you like

Origin www.cnblogs.com/tjp40922/p/12393080.html