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 iurii.skorniakov
def checkio(res):
zipped = [''.join(row) for row in zip(*res)]
diagonal = [''.join([res[i][i] for i in range(3)]),
''.join([res[2-i][i] for i in range(3)])]
for symbol in ["X", "O"]:
if symbol*3 in res + zipped + diagonal:
return symbol
return "D"
Aug. 15, 2017