看板 Python 關於我們 聯絡資訊
以下是我的code: A = '1,2,3,4,\n,5,7,8,9' File = open('test.csv','w') File.write(A) File.close() 我預期匯進去的長相是: 1 2 3 4 5 7 8 9 結果: 1 2 3 4 5 7 8 9 怎麼會這樣呢?~"~ 那要怎麼解決?? 麻煩各位大大了~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.24.54.248
Microscft:把5前面那個逗號拿掉 07/28 15:49
nypgand1:csv有lib http://docs.python.org/2/library/csv.html 07/28 15:51
ET810109:感謝大大~~ 07/28 18:48