0
What is happening here?
number = 3 things = ["string", 0, [1, 2, number], 4.56] print(things[1]) print(things[2]) print(things[2][2]) What is the last line of code doing?
4 odpowiedzi
0
Outputs
0
[1,2,number]
number
0
You should play around by changing index numbers and go through python course as well to understand what's exactly happening ,
0
things is a list with 4 elements. one of these elements is also a string.
0
In the last line
print(things[2][2])
things[2] will give you [1,2,number]
Now from this list [1,2,number] you have to print the value of index no.2 which is number i.e. 3
Hence last line will give the output 3