"\n" in ASCII-file
news at yebu.de
Fri Jul 18 12:49:54 CEST 2003
Martin P schrieb:
> for a short exercise-program I have to read the lines in an ASCII-file.
> But every line has a new-line-feed ("\n") at the end of the line. (The
> ASCII-file was made with Windows Notepad).
> Is this only because I used Windows (and Notepad)?
> And... is there any special method to read lines from a file without "\n"?
If the file isn't very huge, you could try:
gives you a list of lines w/o '\n'.
More information about the Python-list