I am talking about text file which contain multiple lines e.g following
three lines are there in my textfile.txt

this is python list
where we get support
from geeks

I want

sentence = this is python list where we get support from geeks

whereas when i use simple read() i get something like this

sentence = this is python list\nwhere we get support\nfrom geeks

On Wed, Sep 17, 2008 at 10:18 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:

> Usman Ajmal wrote:
>
>  Is there any function for reading a file while ignoring *\n* occuring in
>> the file?
>>
>
> can you be a bit more precise?  are we talking about text files or binary
> files?  how do you want to treat any newlines that actually appear in the
> file?
>
> </F>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to