Count vowels in a string

Write a function count_vowels that takes a string as input and returns the number of vowels (a, e, i, o, u) in the string.
vowels = 'aeiou' def count_vowels(str):
# complete function here...
print(count_vowels('hello world')) # expected output: 3 print(count_vowels('python')) # expected output: 1
Python
Setting up Python environment...
Output