Created
March 21, 2013 17:30
-
-
Save xhinking/5214918 to your computer and use it in GitHub Desktop.
Python Challenge Level 2 Code
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
# 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