file.read problem

Farshid Lashkari flashkNO at SPAMgmail.com
Fri Feb 17 02:10:42 EST 2006


> I am working on a script to get parts of raw data out of a file, and
> the data I read has to be the data written in the file without CR or
> LF.

So you just want to remove all the linefeeds? This should work then:

data = data.replace('\n','')

-Farshid




More information about the Python-list mailing list