Creating the list of lists to represent the board

The list of lists   [ [],[],[],…   ] is used for the board where the first index represents the column and the second the row.  However the list above just contains an empty list for each column.   We want each column to itself contain a list, with contents for each row.

The problem is what to put in each element of the column list for our initial empty grid.

Initially some cells will contain the known starting values. Other cells will have nothing. However these blank cells will be populated with the range of possible values they could contain, hence another list.

This we end up with the need for a list of list to represent the board, where each element (cell) contains a list of possible values.  It is really a list of lists of lists … a,     three dimensional array.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s