Python - csv file is empty after using csv writer

后端 未结 5 1024
终归单人心
终归单人心 2021-01-12 22:19

Python newbie here. I was trying to troubleshoot an issue with writing a csv file in a larger program and decided to go back to basics to try to find the problem.

I

5条回答
  •  情深已故
    2021-01-12 22:42

    I tried this out in the python interpreter. In the first bit of code, I see content in the csv only after I exit python (when the file is closed). Definitely, this was something to with closing the file.

提交回复
热议问题