Advertisement
marbletoff

Untitled

Dec 22nd, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def substitute(al1,al2,str):
  2.     desh=dict(zip(al1,al2))
  3.     return [desh[s] for s in str]
  4.  
  5. alph1='abcdefghijklmnopqrstuvwxyz'
  6. alph2='defghijklmnopqrstuvwxyzabc'
  7.  
  8. print(''.join(substitute(alph1+" ",alph2+" ","the cake is a lie")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement