Tim Chase a écrit :
(snip)
> If you were using strip() to get rid of the newlines, you can easily 
> enough do that with
> 
>     text = text[:-1]

Which is a very bad idea IMHO.

> Or, depending on what your needs are, rstrip() may do the trick for you.

... eventually with it's optional param:

text = text.rstrip('\n')
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to