We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca5b8c1 commit 435f37fCopy full SHA for 435f37f
1 file changed
strings/count_vowels.py
@@ -22,7 +22,8 @@ def count_vowels(s: str) -> int:
22
1
23
"""
24
if not isinstance(s, str):
25
- raise ValueError("Input must be a string")
+ raise TypeError("Input must be a string")
26
+
27
28
vowels = "aeiouAEIOU"
29
return sum(1 for char in s if char in vowels)
0 commit comments