0

Why is the output of this program 8

list=[1,1,2,3,5,8,13] print (list [list [4]])...... PLIS EXPLAIN IN DETAIL.. THANKS

1st Jan 2017, 6:30 AM
stephen haokip
stephen haokip - avatar
1 Answer
+ 2
You printed "list[list[4]]", so you're using a member of that list as an index. list[4] is 5, so what it actually printed was list[5], which is 8.
1st Jan 2017, 6:38 AM
DaemonThread
DaemonThread - avatar