+ 3

task solution

Hello! Can you help me understand, why the correct answer for that code is 8? What is the output of this code? list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]])

3rd Jul 2018, 6:36 PM
Alexey Sapsay
3 Respostas
+ 5
list[4] is 5 so now parameter for "outer array" becomes 5. list[5] = 8
3rd Jul 2018, 6:42 PM
Sad
Sad - avatar
+ 3
I get it! Torn, thank you very much!
3rd Jul 2018, 6:52 PM
Alexey Sapsay
+ 2
You're welcome😉
3rd Jul 2018, 6:52 PM
Sad
Sad - avatar