📜  python 读取 csv - Python 代码示例

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

代码示例6
>>> 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