May-18-2019, 04:35 PM
when using
And please, stop this nonsense about the extra empty line. You must understand that every line end s with new line character. So what you see as
with
context manager, you don't need to call close(), i.e. you don't need output_handler.close()
And please, stop this nonsense about the extra empty line. You must understand that every line end s with new line character. So what you see as
elham,9770
is in fact elham,9770\n
. That's the correct thing to have. As a result there is what you see as empty line. THAT IS NORMAL. In your other thread https://python-forum.io/Thread-Avoiding-...s-csv-file perfringo asked you some question trying to explain this to you. Think what will happen if you don't have new line char at the end of last line with data and you or some one else want to append new data. You will append on the last line, not as a new line. Line ALWAYS end with newline character
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs