0
List
number = 3 things = ["string", 0, [1, 2, number], 4.56] print(things[1]) print(things[2]) print(things[2][2]) OUTPUT 0 [1, 2, 3] 3 How and why output ? =3
1 Resposta
+ 2
At things[2]
there is a list
So
things[2] == [1,2,number]
Where number == 3
and
Let lst = things[2]
Then lst == [1,2,3]
and. lst[2] == 3
Then things[2][2] == 3