Python: load words from file into a set,set(line.strip() for line in open('filename.txt'))