我有一本类似的字典{a: [1, 2, 3], b: [4, 5, 6], c: [7, 3, 2]},我想将它写入 Python 中的 csv 文件。我是 csv 文件:
{a: [1, 2, 3], b: [4, 5, 6], c: [7, 3, 2]}
col1,col2,col3,col4 a,1,2,3 b,4,5,6 c,7,3,2
我尝试使用 CSV Dict writer,但我无法获得,因为值是此处的列表。
任何帮助表示赞赏!
python csv dictionary python-2.7
csv ×1
dictionary ×1
python ×1
python-2.7 ×1