import csv datas = [['俄罗斯', '1707'], ['加拿大', 997], ['中国', 960,111], ['美国', '936']] with open('country.csv', 'w') as csvfile: writer = csv.writer(csvfile) for row in datas: writer.writerow(row)
list保存到scv
最新推荐文章于 2023-04-26 15:33:45 发布
import csv datas = [['俄罗斯', '1707'], ['加拿大', 997], ['中国', 960,111], ['美国', '936']] with open('country.csv', 'w') as csvfile: writer = csv.writer(csvfile) for row in datas: writer.writerow(row)