+ 1
Question With Python Control Structures Module 2 Quiz
I Am Not Able To Understand How This Code: What is the output of this code? list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]]) Results To 8?
1 Odpowiedź
0
list[4] gives the value 5, since the index starts from 0. Now, list[list[4]] equates to list[5], which in turn is 8.