Loading

Vowel Count

DESCRIPTION:
Return the number (count) of vowels in the given string.

We will consider a, e, i, o, u as vowels for this Kata (but not y).

The input string will only consist of lower case letters and/or spaces.
Solution

def getCount(inputStr):
    return sum(1 for let in inputStr if let in "aeiouAEIOU")
posted @ 2023-03-18 10:56  Artwalker  阅读(12)  评论(0编辑  收藏  举报
Live2D