Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. alpha = 'abcdefghijklmnopqrstuvwxyz'
  2. alpha1 = 'ABCDEFGHIJRLMNOPQRSTUVWXYZ'
  3. s = input()
  4. res = ''
  5. for c in s:
  6.     if (c >= 'a') & (c <= 'z'):
  7.         res += alpha[(alpha.index(c) - 13) % len(alpha)]
  8.     elif (c >= 'A') & (c <= 'Z'):
  9.         res += alpha1[(alpha1.index(c) - 13) % len(alpha1)]
  10.     else:
  11.         res += c
  12. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement