MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / display

Function display

data_structures/arrays/sudoku_solver.py:124–138  ·  view source on GitHub ↗

Display these values as a 2-D grid.

(values)

Source from the content-addressed store, hash-verified

122
123
124def display(values):
125 """
126 Display these values as a 2-D grid.
127 """
128 width = 1 + max(len(values[s]) for s in squares)
129 line = "+".join(["-" * (width * 3)] * 3)
130 for r in rows:
131 print(
132 "".join(
133 values[r + c].center(width) + ("|" if c in "36" else "") for c in cols
134 )
135 )
136 if r in "CF":
137 print(line)
138 print()
139
140
141def solve(grid):

Callers 2

time_solveFunction · 0.85
sudoku_solver.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected