def checkio(gameresult: list[str]) -> str:
res1 = gameresult.count('X')
res2 = gameresult.count('O')
res3 = game_result.count('.')
if res_1 > res_2 and res_3 > 0:
return 'X'
elif res_2 == res_1 and res_3 > 0:
return 'O'
else:
return 'D'
Created at: 2023/10/26 14:54; Updated at: 2023/10/26 15:17
The question is resolved.