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程序设计有所帮助。
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com