Eliminate a list of characters from a string?

Tim Peters tim.one at comcast.net
Thu Mar 27 14:22:33 EST 2003


[Max]
> What is the simplest method (that does not perform too poorly)
> for eliminating any of a list of characters from a string.

Read the docs for string.translate(), paying special attention to the third
argument (which is a string containing characters to be deleted).






More information about the Python-list mailing list