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
with open("filename.txt") as f: mySet = map(str.rstrip, f)
If you want to use this in Python 2.5, you need
from __future__ import with_statement