python读文件指定行的数据

import linecache
print linecache.getline('url.txt',2)

读取url.txt文件的第2行内容

原文地址:https://www.cnblogs.com/xingmuxin/p/9304909.html