Skip to content

Instantly share code, notes, and snippets.

@Erilbeth
Created December 8, 2017 08:29
Show Gist options
  • Save Erilbeth/5b508c932bca09929116a33ead7150f8 to your computer and use it in GitHub Desktop.
Save Erilbeth/5b508c932bca09929116a33ead7150f8 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import string
sentence = "g fmnc wms bgblr rpylqjyrc gr zw fylb. \
rfyrq ufyr amknsrcpq ypc dmp. \
bmgle gr gl zw fylb gq glcddgagclr ylb rfyr\'q ufw rfgq rcvr gq qm jmle. \
sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
mylist = []
for i in sentence:
if i in string.lowercase:
num = (string.lowercase.index(i)+2)
if num < 26:
mylist.append(string.lowercase[num])
else:
mylist.append(string.lowercase[num-26])
else:
mylist.append(i)
print(''.join(mylist))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment