Deviopath › Python

Count the Vowels

Easy · Strings

The in operator checks membership: "e" in "aeiou" is True. Calling .lower() first makes the check work for capital letters too.

Write a function count_vowels(text) that returns how many vowels (a, e, i, o, u, in any case) the text contains.

Next: Palindrome Check