What means list in list, why this result : list=[1,2,3,4,5,6,7] print(list[list[4]]) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What means list in list, why this result : list=[1,2,3,4,5,6,7] print(list[list[4]])

Can you describe result a little, why 2times list

28th Dec 2019, 4:54 PM
Joseph Cloude
Joseph Cloude - avatar
1 Answer
+ 2
the result is 6 list[4] = 5th element = 5 list[list[4]] = list[5] = 6
28th Dec 2019, 5:53 PM
Naola
Naola - avatar