[Tutor] Remove specific chars from a string
John Fouhy
john at fouhy.net
Wed Apr 16 01:52:12 CEST 2008
On 16/04/2008, Ricardo Aráoz <ricaraoz at gmail.com> wrote:
> You just have to use maketrans with empty strings. If string is
> deprecated then I guess some other way of creating translation tables
> will be provided.
Most string.* functions are deprecated, because they've been moved to
methods of strings. (e.g. string.capitalize(s) --> s.capitalize())
But that doesn't work for a couple of functions, like maketrans, so
those functions are not deprecated.
--
John.
More information about the Tutor
mailing list