📅  最后修改于: 2022-03-11 14:45:45.473000             🧑  作者: Mango
import csv
f = open("fruits.csv", "w")
writer = csv.DictWriter(
f, fieldnames=["fruit", "count"])
writer.writeheader()
f.close()
Outputfruits.csvfruit,count