KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I realize that the csv library in Python always generates DOS end-of-line characters. Even if I use the 'wb' mode, even if I use Linux. import csv f = open('output.txt', 'wb'); writer = csv.writer(f) writer.writerow([2,3,4]); f.close() The above code always uses '\r\n' as the end of line separator. How can I make it use use '\n' only?
Tags (comma-separated)
Save Edits
Cancel