Skip to content

Instantly share code, notes, and snippets.

@danibrear
Last active August 29, 2015 14:25
Show Gist options
  • Save danibrear/02005eed052d17418eef to your computer and use it in GitHub Desktop.
Save danibrear/02005eed052d17418eef to your computer and use it in GitHub Desktop.
Att Decryption
letters = [ l for l in 'abcdefghijklmnopqrstuvwxyz']
sentence = 'Rz xvi jigt nzz v ncjmo ydnovixz vczvy, wpo rz xvi nzz kgziot oczmz ocvo izzyn oj wz yjiz. - Vgvi Opmdib'
def decrypt(letter):
if letter not in letters: return letter
return letters[((letters.index(letter) + 5) % len(letters))]
for word in sentence.split(' '):
print ''.join([decrypt(letter) for letter in word.lower()]),
# we can only see a short distance ahead, but we can see plenty there that needs to be done. - alan turing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment