Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- infile = open(filename, 'r', encoding="utf-8")
- text = infile.read().lower().split()
- list_of_words = [word.strip('n"-:';,.') for word in text]
- for word in list_of_words:
- if word.isalpha():
- list_2.append(word)
- return list_2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement