whitespace

David Schnepper davidsch at verity.com
Sat Sep 20 02:00:45 CEST 2003


>>> a = " space tab\tlf\nreturn\rFF\f "
>>> "".join(a.split())
'spacetablfreturnFF'
>>>

Quoting RR (rr84 at cornell.edu):
> Is there an easy way in python to remove whitespace from a string?







More information about the Python-list mailing list