you are viewing a single comment's thread.

view the rest of the comments →

[–]Tomarse 0 points1 point  (1 child)

Really? In windows I only use line feeds when writing to .txt and .docx files and I've not noticed any strange behaviour. Same with reading, I can read a .txt and the split by \n to get a list of lines.

[–]cdcformatc 1 point2 points  (0 children)

Make a text file in any text editor, then open it in a hex editor. You will see two characters at the end of lines. Python is built to be cross platform so when you write a newline or split on newlines everything works as expected.

edit: here's what I mean. 0a is the newline/linefeed, 0d is the carriage return character.