whitespace

David Schnepper davidsch at verity.com
Fri Sep 19 20:00:45 EDT 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