Deleting specific characters from a string

Asun Friere afriere at
Thu Jul 10 07:51:50 CEST 2003

Behrang Dadsetan <ben at> wrote in message news:<3F0C8AC3.5010304 at>...

> def isAcceptableChar(character):
>     return charachter in "@&"
> str = filter(isAcceptableChar, str)
> is going to finally be what I am going to use.

Might 'return character not in "@&"' work better?

More information about the Python-list mailing list