Report Bug
Qus :

What will be the output of the following Python code?

matrix = [[1, 2, 3, 4],
         [4, 5, 6, 7],
         [8, 9, 10, 11],
         [12, 13, 14, 15]]  
for i in range(0, 4):
      print(matrix[i][1], end = " ")

Qus

निम्नलिखित Python कोड का आउटपुट क्या होगा?

matrix = [[1, 2, 3, 4],
         [4, 5, 6, 7],
         [8, 9, 10, 11],
         [12, 13, 14, 15]]  
for i in range(0, 4):
      print(matrix[i][1], end = " ")


A. 1 2 3 4
B. 4 5 6 7
C. 1 3 8 12
D. 2 5 9 13


Solution
D. 2 5 9 13



Explanation
Execute in the shell to verify.



Report Bug