0
What is the output of this code...?? Help me and explain too
L = [[2,3,4],[5,6,7],[8,9,10]] Print(L[1][-1])
1 Resposta
+ 1
L = [[2,3,4],[5,6,7],[8,9,10]]
print(L[1][-1])
L[1] refers to [5,6,7] and [-1] refering index from last (reverse way (...,-3,-2,-1) from last to first index 0 (instead of 0,1,2,3,...)) so L[1][-1] refers to 7 from [5,6,7]