Skip to content

Commit a0ba572

Browse files
authored
Update vowels-of-all-substrings.py
1 parent d7995c3 commit a0ba572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/vowels-of-all-substrings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ def countVowels(self, word):
88
:rtype: int
99
"""
1010
VOWELS = set("aeiou")
11-
return sum((i+1) * (len(word)-i) for i, c in enumerate(word) if c in VOWELS)
11+
return sum((i-0+1) * ((len(word)-1)-i+1) for i, c in enumerate(word) if c in VOWELS)

0 commit comments

Comments
 (0)