0

Why is the output of this code equal 8 list = [1,1,2,3,5,8] print (list[list(4)])

I am confuse in this output.

4th Sep 2017, 11:16 AM
Abualgheth J. M. Naji
Abualgheth J. M. Naji - avatar
1 Answer
0
here is double indexing: list[4] = 5 ( I guess it is typo ()->[] ) and then list[list[4]] = list [5] = 8
4th Sep 2017, 12:12 PM
yuri