Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. key = list(input())
  2. alph = sorted("qwertyuiopasdfghjklzxcvbnm")
  3. enc = dict()
  4. dec = dict()
  5. for i in range(len(key)):
  6.     enc[key[i]] = alph[i]
  7.     dec[alph[i]] = key[i]
  8.  
  9. inp = input()
  10. print("".join([dec[c] if c in list("qwertyuiopasdfghjklzxcvbnm") else c for c in inp]))
  11. print("".join([enc[c] if c in list("qwertyuiopasdfghjklzxcvbnm") else c for c in inp]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement