words = set(line.strip() for line in open('words'))
for w in words:
    even, odd = w[::2], w[1::2]
if even in words and odd in words:
    pass
How to optimize this Python code (from ThinkPython, Exercise 10.10)