📜  csv python write - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:24.837000             🧑  作者: Mango

代码示例5
>>> import csv
>>> with open('eggs.csv', newline='') as csvfile:
...     spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
...     for row in spamreader:
...         print(', '.join(row))
Spam, Spam, Spam, Spam, Spam, Baked Beans
Spam, Lovely Spam, Wonderful Spam