Visualize! solution in Clear category for Xs and Os Referee by veky
[g,h,i]] = result
lines = a+b+c, d+e+f, g+h+i, a+d+g, b+e+h, c+f+i, a+e+i, c+e+g
return 'X' if 'XXX' in lines else 'O' if 'OOO' in lines else 'D'
Aug. 16, 2016