PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def minion_game(string):
# your code goes here
#normalize to lower
string = string.lower()
vowels = ['a','e','i','o','u']
stuart_points = 0
kevin_points = 0
res = getAllSubSTR(string)
for ss in res:
if ss.startswith(tuple(vowels)):
kevin_points=stuart_points+1
else:
stuart_points+=1
print("Stuart "+str(stuart_points))
def getAllSubSTR(string):
res = [string[i: j] for i in range(len(string))
for j in range(i + 1, len(string) + 1)]
return res
if __name__ == '__main__':
s = input()
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run