Skip to content

Count the vowels

Count the vowels

Count how many characters of a string are vowels — a, e, i, o, u — treating capitals and lowercase the same.

Lowercase the string first with s.lower() so you only have five letters to check. The expression ch in "aeiou" is True when ch is one of them.

Log in or create account

IGCSE & A-Level