0

list

??????????? list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]]) >>8 bt why 4 no is counting 0,1,2,3,4,5,6....n,N+1 >>5

20th Oct 2016, 2:38 AM
Thameshwar Sinha
Thameshwar Sinha - avatar
1 Resposta
+ 4
list[4] is the 5th element of your list, which is 5. list[list[4]] is thus list[5], the 6th element of your list, which is 8. You should probably pick another name for your list btw.
20th Oct 2016, 9:17 PM
Zen
Zen - avatar