this is the problem . When I wrote
def minion_game(string):
# your code goes here
l =len(string)
kevin = 0
stuart = 0
for x in range(l):
if string[x] in {‘A’,‘E’,‘I’,‘O’,‘U’}:
kevin+=l-x
else:
stuart+=l-x
if (stuart>kevin):
print(“Stuart” ,(stuart))
elif (kevin>stuart) :
print(“Kevin”, (kevin))
else:
print(“Draw”)
It doesnot worked for all cases but when i just changed if statement as
if string[x] in “AEIOU”:
It worked for all cases . Why is it so?