我有一个列表,如[('a', 'b', 'c'), ('d', 'e', 'f'),....].我想把它写成这样的CSV文件 -
[('a', 'b', 'c'), ('d', 'e', 'f'),....]
a, b, c d, e, f
我怎么做?
我尝试过使用csv.writerows,但输出文件中的每个字符都在不同的单元格中,并且所有字符都在同一行中.从某种意义上说,第一排的细胞有"a","b"等.
谢谢.
python csv list
csv ×1
list ×1
python ×1