def check_winning(board_lst, number_lst):
    winning_condition = {'Answer': 0, 'counter': 625}
    for item in board_lst:
        board = create_board(item)
        counter = 0
        for number in number_lst:
            number = float(number)
            counter += 1
            if (number in board):
                result = np.where((board == number))
                board[int(result[0])][int(result[1])] = np.nan
            if (np.all(np.isnan(board), axis=1).any() or np.all(np.isnan(board), axis=0).any()):
                if (counter < winning_condition['counter']):
                    winning_condition['counter'] = counter
                    winning_condition['Answer'] = (number * np.nansum(board))
                    print('The Answer is:', winning_condition)
def check_winning(board_lst, number_lst):
    winning_condition = {'Answer': 0, 'counter': 625}
    for item in board_lst:
        board = create_board(item)
        counter = 0
        for number in number_lst:
            number = float(number)
            counter += 1
            if (number in board):
                result = np.where((board == number))
                board[int(result[0])][int(result[1])] = np.nan
            if (np.all(np.isnan(board), axis=1).any() or np.all(np.isnan(board), axis=0).any()):
                if (counter < winning_condition['counter']):
                    winning_condition['counter'] = counter
                    winning_condition['Answer'] = (number * np.nansum(board))
                    print('The Answer is:', winning_condition)