Skip to content

Commit eddf9ea

Browse files
authored
Update count-vowel-strings-in-ranges.py
1 parent f676e6a commit eddf9ea

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Python/count-vowel-strings-in-ranges.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ def vowelStrings(self, words, queries):
1313
prefix = [0]*(len(words)+1)
1414
for i, w in enumerate(words):
1515
prefix[i+1] = prefix[i]+int(w[0] in VOWELS and w[-1] in VOWELS)
16-
result = []
17-
for l, r in queries:
18-
result.append(prefix[r+1]-prefix[l])
19-
return result
16+
return [prefix[r+1]-prefix[l] for l, r in queries]

0 commit comments

Comments
 (0)