solution.py
def solve(grid):
    """
    Find the solution to a Sudoku grid.
    Args:
        grid(string): a string representing a sudoku grid.
            Example: '2.............62....1....7...6..8...3...9...7...6..4...4....8....52.............3'
    Returns:
        The dictionary representation of the final sudoku grid. False if no solution exists.
    """
    sudoku_init()
    global row_units
    #print(row_units)
    global column_units
    #print(column_units)
    global dia_units
    #print(dia_units)
    global unitlist
    #print(unitlist)
    global units
    #print(units)
    values = grid_values(grid, boxes)
    display(values, boxes, rows, cols)
    values = search(values, boxes, peers, maj_dia, min_dia, unitlist, rows, cols)
    #values = search(values, boxes, peers, maj_dia, min_dia, unitlist, rows, cols)
    display(values, boxes, rows, cols)
    ##print(type(square_units), square_units)
    return values

    Find the solution to a Sudoku grid.
    Args:
        grid(string): a string representing a sudoku grid.
            Example: '2.............62....1....7...6..8...3...9...7...6..4...4....8....52.............3'
    Returns:
        The dictionary representation of the final sudoku grid. False if no solution exists.
    
Find the solution to a Sudoku grid.
Find the solution to a Sudoku grid .
def solve(grid):
    sudoku_init()
    global row_units
    global column_units
    global dia_units
    global unitlist
    global units
    values = grid_values(grid, boxes)
    display(values, boxes, rows, cols)
    values = search(values, boxes, peers, maj_dia, min_dia, unitlist, rows, cols)
    display(values, boxes, rows, cols)
    return values
def solve ( grid ) : sudoku_init ( ) global row_units global column_units global dia_units global unitlist global units values = grid_values ( grid , boxes ) display ( values , boxes , rows , cols ) values = search ( values , boxes , peers , maj_dia , min_dia , unitlist , rows , cols ) display ( values , boxes , rows , cols ) return values
Find the solution to a Sudoku grid.
Find the solution to a Sudoku grid .
"""
    Find the solution to a Sudoku grid.
    Args:
        grid(string): a string representing a sudoku grid.
            Example: '2.............62....1....7...6..8...3...9...7...6..4...4....8....52.............3'
    Returns:
        The dictionary representation of the final sudoku grid. False if no solution exists.
    """ #print(row_units)
 #print(column_units)
 #print(dia_units)
 #print(unitlist)
 #print(units)
 #values = search(values, boxes, peers, maj_dia, min_dia, unitlist, rows, cols)
 ##print(type(square_units), square_units)

The dictionary representation of the final sudoku grid. False if no solution exists.
The dictionary representation of the final sudoku grid . False if no solution exists .
grid
a string representing a sudoku grid.
a string representing a sudoku grid .