Problems > Count the Vowels > Editorial

Count the Vowels — Solution & Editorial

Back to the Problem

Lowercase the string and count membership in {a,e,i,o,u}. O(N) single pass. Python: sum(c in "aeiou" for c in input().lower()).