Skip to content

Instantly share code, notes, and snippets.

@xhinking
Created March 21, 2013 17:30
Show Gist options
  • Save xhinking/5214918 to your computer and use it in GitHub Desktop.
Save xhinking/5214918 to your computer and use it in GitHub Desktop.
Python Challenge Level 2 Code
# find in my other gist
words = open("words.txt").read()
# 97-121 65-90
def Sp(c):
x = ord(c)
if (x >= 65 and x <= 90) or (x >= 97 and x <= 121):
return chr(x)
else:
return ''
str2 = map(Sp, str(words))
print ''.join(str2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment