Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Xs and Os Referee by vnkvstnk
from typing import List
def checkio(game_result: List[str]) -> str:
columns = ["".join(x) for x in zip(*game_result)]
diagonals = ["".join(c) for c in zip(*[(x[i], x[2-i]) for i,x in enumerate(game_result)])]
combination = game_result + columns + diagonals
if "XXX" in combination: return "X"
if "OOO" in combination: return "O"
return "D"
May 30, 2019
Comments: