Ad
Code
Diff
  • def count_vowel(s):
        return len([count for count in s if count in 'aeiouAEIOU'])
    • def count_vowel(s):
    • counter = 0
    • for letter in s.lower():
    • match letter:
    • case 'a' | 'e' | 'i' | 'o' | 'u':
    • counter += 1
    • case _:
    • pass
    • return counter
    • return len([count for count in s if count in 'aeiouAEIOU'])