Quiz Catalog

Catalog of quizzes

mydict = {83:  80}
txt = "Hello Sam!"

print(txt.translate(mydict))
Hello Pam!
  • string/operation/translate

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

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