1 import csv
2        
3 with open(filem,'a',encoding='utf-8',newline='') as f:
4        csv_writer = csv.writer(f)  #基于文件对象构建 csv写入对象
5        csv_writer.writerow(content)    #写入csv文件
6        print('文件写入成功')

 

posted on 2020-03-09 20:44  小和尚不吃素  阅读(205)  评论(0编辑  收藏  举报