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 Ugzuzg
def checkio(game_result):
transposed = list(zip(*game_result))
lines = game_result + transposed
lines.append([game_result[i][i] for i in range(len(game_result))])
lines.append([game_result[i][-i-1] for i in range(len(game_result))])
for l in lines:
if l[0] != '.' and l.count(l[0]) == 3:
return l[0]
return "D"
Feb. 3, 2015