[問題] 讀容量大的文字檔

作者: sariel0322 (sariel)   2014-05-20 22:31:33
想請問一下,我有一個27GB的文字檔
用PYTHON跑都會讀不出來或是跑到當掉
想請問該如何解決
程式碼:
import csv
f = open('123.full','r')
o = open('output.txt','w')
for i in csv.reader(f):
o.write(str(i)+'\n')
f.close()
o.close()
作者: disap ( )   2014-05-20 23:00:00
for i in open('123.full','r'): o.write(str(i)+'\n')

Links booklink

Contact Us: admin [ a t ] ucptt.com