Created
November 21, 2015 08:59
-
-
Save snapfast/56326a67f92649f88aa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Rahul Bali' | |
import string | |
from itertools import cycle | |
a = input() | |
i = 0 | |
rot7="" | |
b = list(string.ascii_lowercase) | |
while i < len(a): | |
pos = 0 | |
alpha=a[i] | |
if(alpha!=" "): | |
pos = b.index(alpha) | |
rotkey=pos-7 | |
if(rotkey<0): | |
rotkey+=26 | |
final=b[rotkey] | |
rot7+=final | |
else: | |
rot7+=alpha | |
i += 1 | |
print(rot7) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment