for col in range(len(board[0])):
    colString = ''
for row in board:
    colString = colString.append(row[col])
if colString.count('111') > 2 or colString.count('222') > 2:
    pass
Determining three in a row in Python 2d array