def eliminate(values):
    "Apply the eliminate strategy to a Sudoku puzzle\n\n    The eliminate strategy says that if a box has a value assigned, then none\n    of the peers of that box can have the same value.\n\n    Parameters\n    ----------\n    values(dict)\n        a dictionary of the form {'box_name': '123456789', ...}\n\n    Returns\n    -------\n    dict\n        The values dictionary with the assigned values eliminated from peers\n    "
    solved_values = [box for box in values.keys() if (len(values[box]) == 1)]
    for box in solved_values:
        digit = values[box]
        for peer in peers[box]:
            values[peer] = values[peer].replace(digit, '')
    return 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
def eliminate(values):
    "Apply the eliminate strategy to a Sudoku puzzle\n\n    The eliminate strategy says that if a box has a value assigned, then none\n    of the peers of that box can have the same value.\n\n    Parameters\n    ----------\n    values(dict)\n        a dictionary of the form {'box_name': '123456789', ...}\n\n    Returns\n    -------\n    dict\n        The values dictionary with the assigned values eliminated from peers\n    "
    solved_values = [box for box in values.keys() if (len(values[box]) == 1)]
    for box in solved_values:
        digit = values[box]
        for peer in peers[box]:
            values[peer] = values[peer].replace(digit, )
    return values