Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
[Count All Vowels With Reduce] [Clear and Pythonic Solution] solution in Clear category for Count Vowels by sanddro
from functools import reduce
def count_vowels(text: str) -> int:
return reduce(lambda x, y: x + (y in "aeiou"), text.lower(), 0)
Feb. 24, 2025