How 8 came in the output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
23rd Feb 2020, 1:56 PM
LMNTRIX
LMNTRIX - avatar
2 Answers
+ 4
It is a 2D array! Col 0 1 2 3 Row 0 [[1,3,4,5], Row 1 [2,6,8,9]] So, the index is taken as -- row and then column So, (x)[1,2] is Row 1, column 2 Which is 8
23rd Feb 2020, 2:00 PM
Utkarsh Sharma
Utkarsh Sharma - avatar
+ 2
[2, 6, 8, 9] is in index position 1 of list and 8 is in index position 2 of [2, 6, 8, 9] list[1][2] = 8
23rd Feb 2020, 2:02 PM
Kylie
Kylie - avatar