Q.

What is the output of the following?
elements = [0, 1, 2]
def incr(x):
return x+1
print(list(map(incr, elements)))

A. [1, 2, 3].
B. [0, 1, 2].
C. error
D. none of the mentioned
Answer» A. [1, 2, 3].
2.8k
0
Do you find this helpful?
48

View all MCQs in

Python Programming

Discussion

No comments yet