Python3 csv writer failing, exiting on error "TypeError: 'newline' is an invalid keyword argument for this function

前端 未结 4 419
盖世英雄少女心
盖世英雄少女心 2021-01-20 19:33

What I\'m trying to do:

I\'m trying to change the formatting on a csv file from space delimited to comma delimited.

What I\'ve don

4条回答
  •  心在旅途
    2021-01-20 19:44

    The wording is just a bit vague. The file should be opened with newline='', but newline is not a valid option for csv.writer() itself.

提交回复
热议问题