How to remove "\n" in a string?
Oleg Broytmann
phd at phd.pp.ru
Thu Sep 20 06:23:40 EDT 2001
On Thu, Sep 20, 2001 at 03:15:33AM -0700, rainlet wrote:
> s = ".............."
> s.replace ( "\n", "" )
s = s.replace ( "\n", "" )
Strings are immutable in Python - any operation on a string does not
modify the string, it returns the new string.
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list