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

前端 未结 4 452
盖世英雄少女心
盖世英雄少女心 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:59

    The following will do

    with open('filename_inCSV.csv',mode='r') as csvfile:
    

    or

    with open('filename_inCSV.csv','r') as csvfile:
    

提交回复
热议问题