Skip to content

Commit f3daa2a

Browse files
Update count_vowels.py
1 parent 16949aa commit f3daa2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strings/count_vowels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def count_vowels(s: str) -> int:
2222
1
2323
"""
2424
if not isinstance(s, str):
25-
raise TypeError("Input must be a string")
25+
raise ValueError("Input must be a string")
2626

2727
vowels = "aeiouAEIOU"
2828
return sum(1 for char in s if char in vowels)

0 commit comments

Comments
 (0)