0
What is the output and why?
What is the output? What type of indexing is this? a = [5,4,3,2,1,0] print(a[a[a[2]+1]])
2 Réponses
+ 4
evaluation of order:
a[ a[ a[2]+1 ] =>
a[2] => 3
a[2]+1 = 3+1 => 4
a[ a[2]+1 ] = a[ 4 ] => 1
a[ a[ a[2]+1 ] = a[ 1 ] => 4
Outouts : 4
Hope it helps..
- 3
Manav Roy still not a proper explaination.