I want to calculate the number of words containing more than two vowels from a list of words.
count = 0
for myword in mylist:
d = {}.fromkeys('aeiou',0)
haslotsvowels = False
for x in myword.lower():
if x in d:
d[x] += 1
for q in d.values():
if q > 2:
haslotsvowels = True
if haslotsvowels:
count += 1
print(count)