Home / Engineering / Problem Solving and Python Programming / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) >>>m = [[x, x + 1, x + 2] for x in range(0, 3)]

(A) [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
(B) [[0, 1, 2], [1, 2, 3], [2, 3, 4]]
(C) [1, 2, 3, 4, 5, 6, 7, 8, 9]
(D) [0, 1, 2, 1, 2, 3, 2, 3, 4]
Correct answer : Option (B) - [[0, 1, 2], [1, 2, 3], [2, 3, 4]]

Explanation:
 execute in the shell to verify.

Share

Discusssion

Login to discuss.