Skip to content
Advertisement

Writing To CSV file Without Line Space in Python 3

I am trying out the program for writing to a CSV file.

Here’s my code:

JavaScript

The program runs well. But in the CSV file, there is a blank newline space (without any entries) between each entry. How to eliminate that line in the resultant CSV file?

Advertisement

Answer

Recommended implementation per Python3 Documentation.

JavaScript

https://docs.python.org/3/library/csv.html#csv.writer

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement