+ 2
Can any help me? (Small doubt )
#why the answer is9 a=[4,3,9,5] b=a[-2] print(b)
3 Réponses
+ 7
indexing from last element goes like this
-1,-2,-3,-4
+ 2
Bruklin a[-2] means the second element list a from end of this array. a[-1]=5, a[-2]=9, a[-3]=3, a[-4]=4. So b=a[-2] means b=9...
0
thank u everyone