Quiz Catalog

Catalog of quizzes

txt = "Hi Sam!"
x = "mSa"
y = "eJo"
mytable = txt.maketrans(x, y)

print(txt.translate(mytable))
Hi Joe!
  • string/operation/maketrans
  • string/operation/translate