Hello, I would like to ask your help. I have a python code where it is necessary to analyze one thing: analyze the words of a sentence and save the ones with an even number of vowels. Example: "I got home and went to play video games". The word "I came" has 4 vowels, 4 is even so I need to save it in a list. I want to do this with all the sentences read and then write all the words in the list.
Incomplete code:
def frases():
vog="aeiou"
dig="0123456789"
sd=0
sv=0
vp=[]
f = str(input('Digite uma frase: ')).lower()
while f != '':
vp = f.split()
for a in range(len(vp)):
for l in vp[a]:
if l in vog:
sv+=1
for d in vp[a]:
if d in dig:
sd += 1
print('Palavras contidas na frase: {}'.format(len(vp)))
print('Total de vogais: {}'.format(sv))
print('Total de dígitos: {}'.format(sd))
print()
f = str(input('Digite uma frase: ')).lower()
phrases ()