Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clear solution in Clear category for Xs and Os Referee by timqsh
from typing import List
def checkio(game_result: List[str]) -> str:
for side in ("X","O"):
if (side*3 == game_result[0][0]+game_result[1][1]+game_result[2][2]
or side*3 == game_result[0][2]+game_result[1][1]+game_result[2][0]
or any(row==side*3 for row in game_result)
or any("".join(col)==side*3 for col in zip(*game_result))):
return side
return "D"
Dec. 29, 2018