List Comprehension in Pythonic answer to LPTHW ex48
That's normal, because with the list comprehension you're generating a whole
list of results instead of returning the first time the check succeeds.

If you want to have the equivalent code to the loop version, that is, just
compute the first value or return None if no check succeeds, you can use a
generator as follows:

return next(((label, word)
             for label, type in word_types.items()
             if word in type),
            None)


where the generator is exactly as the list comprehension, but with parentheses
instead of square brackets and next is a built-in method to get the next value
from an iterator or return the default value if the iterator is exhausted.

Note: if you don't pass a default value you'll get a StopIteration when the iterator is exhausted.