0
list
number = 3 things = ["string", 0, [1, 2, number], 4.56] print(things[1]) print(things[2]) print(things[2][2]) How does this last code works?
2 Answers
+ 2
things[2] = [1,2,number]
so
things[2][2] = [1,2,number][2] = number = 3
+ 1
things is a list and has a list in it at index 2. The element at index 2 of this list in things is indexed in the last line of your code