Editing a string

kurtn at my-deja.com kurtn at my-deja.com
Thu May 4 13:03:31 EDT 2000


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.



More information about the Python-list mailing list