0
LIsts
Can someone please explain to me why the output of this code is not 5? list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]])
2 Answers
+ 3
It's 8. The reason is Operator Precedence...
First it takes list[4], which is = 5.
Then it takes the outer list having 5 in brackets, so list[5] is 8...
Hope it helps..✌️
+ 3
List[4]=5 ,then list[5]=8 ,
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
2 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes
Number of Ones ( C++ ) question!
1 Votes