"\n" in ASCII-file

Batista, Facundo FBatista at uniFON.com.ar
Fri Jul 18 13:37:26 CEST 2003


#- And... is there any special method to read lines from a file 
#- without "\n"?

If you're sure you have the '\n' at the end, you can:

myfile = file('myfile')
for line in myfile:
	line = line[:-1]
	...

.	Facundo





More information about the Python-list mailing list