Editing a string

Bill Scherer scherbi at bam.com
Thu May 4 20:10:48 CEST 2000


import string
string.strip(str)
....

kurtn at my-deja.com wrote:

> file=open('gs.txt','r')
> pr=''
> while 1:
>         line = file.readline()
>         if not line:
>                 break
>         pr=pr+line
> file.close()
> print [pr]
>
> output:
> ['attgctagcytr   \012']
>
> How can I delete the space and \012 without editing the file. Is there
> a built-in function?
>
> thanks
> k
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> --
> http://www.python.org/mailman/listinfo/python-list

--
William K. Scherer
Sr. Member of Applications Staff
Verizon Wireless







More information about the Python-list mailing list