I have a simple text file with several thousands of words, each in its own line, e.g.
aardvark hello piper
I use the following code to load
my_set = set(map(str.strip, open('filename.txt')))