[Tutor] Two dimensional lists

Phil phillor9 at gmail.com
Mon Nov 2 03:36:39 EST 2020


On 2/11/20 5:22 pm, Cameron Simpson wrote:

I've explicitly laid out a list of lists.

Thank you again Cameron.

I left a pair of square brackets off my previous reply. It's been a long 
day and this is what I meant in my reply:

 >>> b = [[5],[5]]
 >>> b[3][2] = 9
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
IndexError: list index out of range

I know there's still a problem there, I'll look into it tomorrow.

-- 

Regards,
Phil



More information about the Tutor mailing list