here2share

# b_str_translate.py

Oct 27th, 2021
668
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # b_str_translate.py
  2.  
  3. from string import maketrans
  4.  
  5. txt = "Python Is Awesome!"
  6.  
  7. print txt
  8.  
  9. switch_from = "IshowPAymnt! "
  10. switch_to = "hastfB oh art"
  11.  
  12. sss = maketrans(switch_from, switch_to)
  13.  
  14. qqq = txt.translate(sss)
  15. print qqq
RAW Paste Data