时间:2021-07-01 10:21:17 帮助过:51人阅读
import csv with open('eggs.csv', 'wb') as csvfile: #spamwriter = csv.writer(csvfile, delimiter=' ',quotechar='|', #quoting=csv.QUOTE_MINIMAL) spamwriter = csv.writer(csvfile, dialect='excel') spamwriter.writerow(['Spam'] * 5 + ['Baked Beans']) spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])
希望本文所述对大家的Python程序设计有所帮助。