any(vowel in word for vowel in 'aeiou')
Where word
is the word you're searching.
Broken down:
any
returns True
if any of the values it checks are True
returns False
otherwise
for vowel in 'aeiou'
sets the value of vowel
to a, then e, then i, etc.
vowel in word
checks if the string word
contains vowel.
If you don't understand why this works, I suggest you look up generator expressions, they are a very valuable tool.
EDIT
Oops, this returns True
if there is a vowel and False
otherwise. To do it the other way, you could
all(vowel not in word for vowel in 'aeiou')
or
not any(vowel in word for vowel in 'aeiou')