Created
April 1, 2014 19:53
-
-
Save ldong/9921759 to your computer and use it in GitHub Desktop.
Python Challenge Level 2
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
#!/usr/bin/env python2 | |
### Original Repo http://hacked2bits.com/software/python-challenge/ | |
file_name = raw_input("File name: ") | |
with open(file_name, 'r') as f: | |
file_data = f.read() | |
characters = [] | |
data = list(file_data) | |
for i in xrange(len(data)): | |
if (65 <= ord(data[i]) <= 90) or (97 <= ord(data[i]) <= 122): | |
characters.append(data[i]) | |
text = "".join(characters) | |
print text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment