Vidyalelo
Python · Q85

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 85

Q85

What will be the output of the following Python code? A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] [A[i][i] for i in range(len(A))]

A.
[1, 5, 9]
Answer
B.
[3, 5, 7]
C.
[4, 5, 6]
D.
[2, 5, 8]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board