← Quiz: Matrix Traversal: all 13 questions
Quiz: Matrix Traversal · Question 1 of 13
What does this print? (code)
What does this print?
m = [[1, 2], [3, 4], [5, 6]]
print(len(m), len(m[0]), m[2][1])
- A.2 3 4
- B.3 2 6
- C.3 2 5
- D.2 3 6
Answer & explanation
Correct answer: 3 2 6
There are 3 rows of 2 columns; m[2][1] is row 2 (the third row), column 1: 6.
Can you get the rest right without peeking?
Take the timed Quiz: Matrix Traversal quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →