0
it's about list
list = [1,1,2,3,5,8,13] print(list[list[list[4]]) the result is 8, but I don't know why. thank You to explain.
1 Odpowiedź
+ 3
list[4] is 5
hence, list[list[4]] is list[5], which is 8
list[list[list[4]]] is list[8], which is undefined.
Your code snippet is missing a closing ]
and if the third closing ] exists, it will raise Index Out Of Range Error instead of printing 8