rgt = list(reversed(lft))
transpositions = {'horizontal': board, 'vertical': zip(*board), 'diag_forw':
    zip(*[(lft[i] + board[i] + rgt[i]) for i in range(n_rows)]),
    'diag_back': zip(*[(rgt[i] + board[i] + lft[i]) for i in range(n_rows)])}
for direction, transp in transpositions.items():
    for row in transp:
        s = ''.join(map(str, row))
for player in range(1, 3):
    if s.find(str(player) * 3) >= 0:
        pass
Determining three in a row in Python 2d array