+ 1
Shouldn't the answer be 5?(Python 3)
Maybe I'm over-thinking the question, but for this question here: list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]]) Shouldn't the answer be 5? Instead, I'm getting 8 as the answer. Can someone please explain to me how 8 is the answer?
3 ответов
+ 7
print(list[list[4]])
print(list[5])
print(8)
+ 1
No. Notice that the 5 you thought you should get is used to index another value.
+ 1
Oh, now it makes a lot of sense to me. Thank you guys so much for the help. I didn't want continue on with my lessons without understanding how that was the answer.