First we define some constants needed everywhere in the solution.
#================================================================ # Manifest constants #----------------------------------------------------------------
SUBMAT_L
Size of a submatrix.
SUBMAT_L = 3
MAT_L
Dimensions of the matrix (9).
MAT_L = SUBMAT_L ** 2
BOARD_L
Size of the list representing the entire matrix (81).
BOARD_L = MAT_L ** 2
EMPTY
The value used to represent empty cells.
EMPTY = 0