There was an error while loading. Please reload this page.
1 parent ce19ee4 commit 40e46d6Copy full SHA for 40e46d6
1 file changed
strings/count_vowels.py
@@ -22,7 +22,7 @@ def count_vowels(s: str) -> int:
22
1
23
"""
24
if not isinstance(s, str):
25
- raise TypeError("Input must be a string")
+ raise ValueError("Input must be a string")
26
27
vowels = "aeiouAEIOU"
28
return sum(1 for char in s if char in vowels)
0 commit comments