Deleting characters from a string

Hrvoje Niksic hniksic at
Sun Jun 6 09:09:39 EDT 1999

"Hans Nowak" <ivnowa at> writes:

> Hmm... how about
> host = filter(lambda c: not c in ' "', host)
> Depends on how much you like, or hate, functional idiom, though. :)

I adore functional idioms (I also use the various Lisps), but I don't
adore their slowness in Python so I avoid using them.

More information about the Python-list mailing list