Second solution in Clear category for Xs and Os Referee by
row1, row2, row3 = result
dia1 = row1 + row2 + row3
dia2 = row1 + row2 + row3
columns = [row1[i] +row2[i] + row3[i] for i in range(3)]
all = [row1,row2,row3,dia1,dia2] + columns
return 'X' if 'XXX' in all else 'O' if 'OOO' in all else 'D'
Nov. 23, 2016