Examveda

What will be the output of the following Python code?
>>>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]

Answer: Option B


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python