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

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


更多推荐

python读文件指定行的数据