SudokuFunctions.py
def eliminate(values):
    """Apply the eliminate strategy to a Sudoku puzzle

    The eliminate strategy says that if a box has a value assigned, then none
    of the peers of that box can have the same value.

    Parameters
    ----------
    values(dict)
        a dictionary of the form {'box_name': '123456789', ...}

    Returns
    -------
    dict
        The values dictionary with the assigned values eliminated from peers
    """
    
    # We get the boxes that have already unique value
    boxes_one_value = [u for u in values.keys() if len(values[u]) == 1]
    for box in boxes_one_value:
        digit = values[box]
        #We get the peers for that box, and erase the number (digit) of that box as an option on its peers
        for peer_box in peers[box]:
            values[peer_box] = values[peer_box].replace(digit, "")
    return values
    
    raise NotImplementedError
Apply the eliminate strategy to a Sudoku puzzle

    The eliminate strategy says that if a box has a value assigned, then none
    of the peers of that box can have the same value.

    Parameters
    ----------
    values(dict)
        a dictionary of the form {'box_name': '123456789', ...}

    Returns
    -------
    dict
        The values dictionary with the assigned values eliminated from peers
    
Apply the eliminate strategy to a Sudoku puzzle
The eliminate strategy says that if a box has a value assigned, then none
of the peers of that box can have the same value.

Parameters



Returns

dict
The values dictionary with the assigned values eliminated from peers
Apply the eliminate strategy to a Sudoku puzzle The eliminate strategy says that if a box has a value assigned then none of the peers of that box can have the same value . Parameters Returns dict The values dictionary with the assigned values eliminated from peers
def eliminate(values):
    boxes_one_value = [u for u in values.keys() if len(values[u]) == 1]
    for box in boxes_one_value:
        digit = values[box]
        for peer_box in peers[box]:
            values[peer_box] = values[peer_box].replace(digit, "")
    return values
    raise NotImplementedError
def eliminate ( values ) : boxes_one_value = [ u for u in values . keys ( ) if len ( values [ u ] ) == 1 ] for box in boxes_one_value : digit = values [ box ] for peer_box in peers [ box ] : values [ peer_box ] = values [ peer_box ] . replace ( digit , "" ) return values raise NotImplementedError
Apply the eliminate strategy to a Sudoku puzzle
The eliminate strategy says that if a box has a value assigned, then none
of the peers of that box can have the same value.
Apply the eliminate strategy to a Sudoku puzzle The eliminate strategy says that if a box has a value assigned then none of the peers of that box can have the same value .
"""Apply the eliminate strategy to a Sudoku puzzle

    The eliminate strategy says that if a box has a value assigned, then none
    of the peers of that box can have the same value.

    Parameters
    ----------
    values(dict)
        a dictionary of the form {'box_name': '123456789', ...}

    Returns
    -------
    dict
        The values dictionary with the assigned values eliminated from peers
    """ # We get the boxes that have already unique value #We get the peers for that box, and erase the number (digit) of that box as an option on its peers
values