write a function that returns the number of vowels from a given string python code example
Example: vount vowels python
vow = ['a', 'A', 'e',
'E', 'i', 'I',
'o', 'O', 'U',
'u', 'Y', 'y']
def vowels(str):
global vow
string = list(str)
count = 0
for i in range(len(string)):
if string[i] in vow:
count += 1
return count