Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.
words = set(line.strip().lower() for line in open('/usr/share/dict/words'))
is a list comprehension, which means a for loop squished into one line. The net effect is we have the entire english language stored in the variable words.