Files
leetcode/3227-vowels-game-in-a-string/3227-vowels-game-in-a-string.py
T

13 lines
287 B
Python

class Solution(object):
def doesAliceWin(self, s):
"""
:type s: str
:rtype: bool
"""
def isVowel(c):
return len(c) == 1 and c in "aeiou"
# Count vowels
numVowels = sum(map(isVowel, s))
return numVowels > 0