String.translate (out, in [, pad]) Translates the string using the in and out tables 12345.translate (" qwertyuiop ", "1234567890") returns "qwerty".
translate (out, in [,pad])用输入输出表转换字符串12345 . translate (“ qwertyuiop ”,“ 1234567890 ”)返回“ qwerty ”。
youdao