Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sort(fn):
- txt = get_txt(fn)
- word_list = []
- symbols = "!@#-$%^&*()\"_<>?,.[]{}`~'"
- for word in txt.split():
- clear_word = ""
- if word.isalpha():
- clear_word += word.lower()
- if clear_word not in symbols:
- word_list.append(clear_word)
- return word_list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement