[Tutor] The Python way and two dimensional lists
Phil
phillor9 at gmail.com
Tue Dec 7 04:13:16 EST 2021
On 7/12/21 19:39, David wrote:
>
> I don't know what it is that you aren't understanding.
> But you seem to be unclear so I have written a quick
> demo of 2D list indexing below for you.
Thank you David. I will study and run your code trough a debugger.
While I was typing my previous e-mail I thought of a solution.
col = [row[c] for row in self.solution] gives me the entire column. So
what I need is to extract the first three rows for the top three boxes.
Then for the next row of boxes I need the middle section of the column
(rows 3, 4 and 5) and for the last row of boxes I need the last three
rows of the column. At the moment I don't know how I might do this but
that's a project for tomorrow.
--
Regards,
Phil
More information about the Tutor
mailing list