Deleting specific characters from a string

Behrang Dadsetan ben at dadsetan.com
Thu Jul 10 02:53:44 EDT 2003


Asun Friere wrote:
> Behrang Dadsetan <ben at dadsetan.com> wrote in message news:<3F0C8AC3.5010304 at dadsetan.com>...
> 
> 
>>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?
ahem... yes of course...





More information about the Python-list mailing list