Mar-19-2019, 04:54 PM
I would like to take any text document and make a word list from the file with no duplicates. I don't know much about programming. This is the best I have been able to come up with. Thanks!
1 2 3 4 5 6 7 |
def MakeWordList(): with open ( 'test.txt' , 'r' ) as f: data = f.read() return set ([word for word in data.split()]) print () |