I'm trying to create a program that you can type a word and will tell you the vowels and consonants on it, I tried to use a list for the vowels but when I run the program it only prints the else or consonant parameter.I'm new at python-3.x and programming in general. What am I doing wrong?.
def run(word,list_vocal):
for letter in word:
if letter == list_vocal:
print(letter + 'is a vowel')
else:
print(letter + 'is a consonant')
if __name__ == '__main__':
word = str(input('Type your word ')
list_vocal = ['a', 'e' , 'i', 'o'. 'u']
run(word,list_vocal)
I'm only considering the Spanish vowels.
.