hdarwin

wechall.net_Training: Crypto - Caesar I

Dec 28th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #!/usr/bin/env python
  2. str = "XLI UYMGO FVSAR JSB NYQTW SZIV XLI PEDC HSK SJ GEIWEV ERH CSYV YRMUYI WSPYXMSR MW KTTKJQKWKTEI"
  3. new = []
  4. for y in xrange(1,27):
  5.     for x in str:
  6.         if(x == " "):
  7.             new.append(x)
  8.             continue
  9.         reform = ord(x)
  10.         if((reform + y) < 91):
  11.             new.append(chr(reform + y))
  12.         else:
  13.             new.append(chr(reform + y - 26))
  14.     print ''.join(new)
  15.     new = []
Advertisement
Add Comment
Please, Sign In to add comment