solver.py
def create_template(sudoku_order):
    """
    Create a template string for printing sudoku results.

    Parameters
    ----------
    sudoku_order: int
        The number of cells in a row or column of a subgrid; the number of rows or columns of subgrids in the sudoku.

    Returns
    -------
    str
        Template string used internally by Sudoku.print()
    """
    cell = '{0}{{}}{0}'.format(PAD)
    block_row = CELL_VSEP.join([cell] * sudoku_order)
    row = BLOCK_VSEP.join([block_row] * sudoku_order)
    row_len = len(row) - row.count('}')

    cell_hline = '\n{}\n'.format(CELL_HSEP * row_len) if CELL_HSEP else '\n'
    block_rows = cell_hline.join([row] * sudoku_order)
    block_hline = '\n{}\n'.format(BLOCK_HSEP * row_len) if BLOCK_HSEP else '\n'

    return block_hline.join([block_rows] * sudoku_order)

    Create a template string for printing sudoku results.

    Parameters
    ----------
    sudoku_order: int
        The number of cells in a row or column of a subgrid; the number of rows or columns of subgrids in the sudoku.

    Returns
    -------
    str
        Template string used internally by Sudoku.print()
    
Create a template string for printing sudoku results.
Parameters

int
The number of cells in a row or column of a subgrid; the number of rows or columns of subgrids in the sudoku.

Returns

str
Template string used internally by Sudoku.print()
Create a template string for printing sudoku results . Parameters int The number of cells in a row or column of a subgrid ; the number of rows or columns of subgrids in the sudoku . Returns str Template string used internally by Sudoku . print ()
def create_template(sudoku_order):
    cell = '{0}{{}}{0}'.format(PAD)
    block_row = CELL_VSEP.join([cell] * sudoku_order)
    row = BLOCK_VSEP.join([block_row] * sudoku_order)
    row_len = len(row) - row.count('}')
    cell_hline = '\n{}\n'.format(CELL_HSEP * row_len) if CELL_HSEP else '\n'
    block_rows = cell_hline.join([row] * sudoku_order)
    block_hline = '\n{}\n'.format(BLOCK_HSEP * row_len) if BLOCK_HSEP else '\n'
    return block_hline.join([block_rows] * sudoku_order)
def create_template ( sudoku_order ) : cell = '{0}{{}}{0}' . format ( PAD ) block_row = CELL_VSEP . join ( [ cell ] * sudoku_order ) row = BLOCK_VSEP . join ( [ block_row ] * sudoku_order ) row_len = len ( row ) - row . count ( '}' ) cell_hline = '\n{}\n' . format ( CELL_HSEP * row_len ) if CELL_HSEP else '\n' block_rows = cell_hline . join ( [ row ] * sudoku_order ) block_hline = '\n{}\n' . format ( BLOCK_HSEP * row_len ) if BLOCK_HSEP else '\n' return block_hline . join ( [ block_rows ] * sudoku_order )
Create a template string for printing sudoku results.
Create a template string for printing sudoku results .
"""
    Create a template string for printing sudoku results.

    Parameters
    ----------
    sudoku_order: int
        The number of cells in a row or column of a subgrid; the number of rows or columns of subgrids in the sudoku.

    Returns
    -------
    str
        Template string used internally by Sudoku.print()
    """
sudoku_order