Click to See Complete Forum and Search --> : Is there a 'tr' method in Python?


Gnu/Vince
01-25-2002, 12:13 AM
http://dev.rubycentral.com/ref/ref_c_string.html#tr

Is there something like this in Python? I know string.replace, but I don't think it supports intervals.

Strike
01-25-2002, 01:37 AM
Nothing supports intervals in Python (you've asked me before), and the method you want is "translate"

Gnu/Vince
01-25-2002, 08:14 AM
I asked you that? Oh well...