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寫到檔案內的寫法