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

看板Python作者 (sariel)時間11年前 (2014/05/20 22:31), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/2 (看更多)
想請問一下,我有一個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() -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 120.126.36.171 ※ 文章網址: http://www.ptt.cc/bbs/Python/M.1400596296.A.F8F.html

05/20 23:00, , 1F
for i in open('123.full','r'): o.write(str(i)+'\n')
05/20 23:00, 1F
文章代碼(AID): #1JUsT8-F (Python)
討論串 (同標題文章)
文章代碼(AID): #1JUsT8-F (Python)