📜  python read scv - Python 代码示例

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

代码示例3
import csv
with open('eggs.csv', newline='') as csvfile:
    spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
    for row in spamreader:
        print(', '.join(row))

# Output:
# Spam, Spam, Spam, Spam, Spam, Baked Beans
# Spam, Lovely Spam, Wonderful Spam