I was reading my textbook, and I am confused what the importance of vowels_in_word = "" does? I'm not sure what the significance of it is. Does it just hold the the values of char? Also, when creating for
loops, what is char? Can you just assign your own variable even if its not assigned anywhere in the program?
def get_vowels_in_word(word):
vowel_str = "aeiouy"
vowels_in_word = ""
for char in word:
if char in vowel_str:
vowels_in_word += char
return vowels_in_word