python3将结果导出csv(excel)

python3将结果导出csv(excel)

def write_csv(c11,c1122):
  c11s=c11
  c1122s=c1122
  path = "csv.csv"
  with open(path,'a+',newline="") as f:
    csv_write = csv.writer(f)
    data_row = [c11s,c1122s]
    csv_write.writerow(data_row)
write_csv('要写入的内容','要写入的内容')

posted @ 2020-12-01 11:38  小军递  阅读(583)  评论(0)    收藏  举报