return {w for w in words if w in WORDS}
return words & WORDS
return words.intersection(WORDS)
Not quite. It'd have to be set(WORDS) instead of WORDS -- which'd be expensive. Or WORDS.keys(), which I'm not sure about -- I'd have to benchmark it.