f = open('123.txt','r')
lines = f.readlines()
print len(lines) #2000000 lines
startindex = 30
endindex = 15000
outputfile = open('456.txt','w')
for i in range(startindex,endindex):
outputfile.write(lines[i])
outputfile.close()
想询问除了这样写以外 有无更快的写法
可以直接把string list写到档案内的写法