标签: python
当我在文本编辑器中运行以下简单语法时,它非常安静: 然后输出: 问题是如何删除列,直到得到此列:
[
答案 0 :(得分:0)
以二进制模式打开文件:with open(file, 'w+b') as csv_file:
with open(file, 'w+b') as csv_file:
或将newline设置为空字符串:with open(file, 'w+', newline='') as csv_file:
newline
with open(file, 'w+', newline='') as csv_file:
来源:https://stackoverflow.com/a/3191811/6685140