If a=[ 5,4,3,2,1,0] evaluate the following
a[a[a[a[2] +1]]]
a) [3,2,1]
b) [2,1,0]
c) 1
d) [1]h
Answers
Answered by
0
Answer:
The answer is C) 1
Explanation:
a = [5,4,3,2,1,0];
print(a[2]+1); # a[2] + 1 = 3 + 1 => 4
print(a[a[2]+1]); #a[4] => 1
print(a[a[a[2]+1]]); # a[1] => 4
print(a[a[a[a[2]+1]]]); #a[4] => 1
Similar questions