0
Casting things as list
list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]]) I thought the answer was 5 but running the code gives me 8. I understand that print(list[4]) gives 5, but why is it calling the variable name "list" and then calling list[4]
2 Answers
+ 2
Nevermind, I saw another post where they explained it.
Solve for the item in parentheses which is list[4] which would be 5.
So then list[5] would be 8.
+ 2
If you got your answer then what is the use of this question before asking questions just a research over it to field its solution if possible