Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mess = open('c://riddles//mess.txt')
- tidy_string = ""
- def cleanline(line):
- cleaned = ""
- for char in line:
- if (ord('a') <= ord(char) <= ord('z')):
- cleaned += char
- return cleaned
- for line in mess:
- tidy_string += cleanline(line)
- print tidy_string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement