See
str.translate
.