Skip to content

Instantly share code, notes, and snippets.

@snapfast
Created November 21, 2015 08:59
Show Gist options
  • Save snapfast/56326a67f92649f88aa0 to your computer and use it in GitHub Desktop.
Save snapfast/56326a67f92649f88aa0 to your computer and use it in GitHub Desktop.
__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