Better string.translate?

Steve Purcell stephen_purcell at
Thu Mar 15 09:44:37 CET 2001

Stowasser Harald wrote:
> "Steve Purcell" <stephen_purcell at> schrieb :
> > Use the 'sub' function in the 're' module:
> Thank you, but i don't want do delete the characters. I need to
> translate them into Spaces.

So change the '' replacement string into ' ' in the code I posted.

You could try (shock! horror!) reading the documentation for the 're.sub'
function. It'll take a long time to finish your code if you have to rely
on the mailing list to show you everything one character at a time. <wink>


Steve Purcell, Pythangelist
Get testing at
Any opinions expressed herein are my own and not necessarily those of Yahoo

More information about the Python-list mailing list