0
繼續嘗試寫入文件,但文件是空的:-(我已經嘗試了很多東西,感覺自己在旋轉,我是一個新手,你可以告訴任何幫助。不勝感激寫完後空文件
import shutil
import re
import csv
import sys # imports the sys module
infile = csv.reader(open("March9small.csv", "rU"), dialect=csv.excel_tab)
reader=csv.reader(infile)
new_rows_list=[]
for row in infile:
new_rows_list.append(row)
print new_rows_list
outfile = csv.writer(open("March9small-revised.csv","wt"), dialect=csv.excel_tab)
for i in new_rows_list:
outfile.writerow(i)