diff --git a/3227-vowels-game-in-a-string/3227-vowels-game-in-a-string.py b/3227-vowels-game-in-a-string/3227-vowels-game-in-a-string.py new file mode 100644 index 0000000..f0293bb --- /dev/null +++ b/3227-vowels-game-in-a-string/3227-vowels-game-in-a-string.py @@ -0,0 +1,13 @@ +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 \ No newline at end of file