adplus-dvertising
frame-decoration

Question

What is the output of the code shown?
l=[1, 2, 3, 4, 5]
m=map(lambda x:2**x, l)
print(list(m))

a.

[1, 4, 9, 16, 25 ]

b.

[2, 4, 8, 16, 32 ]

c.

[1, 0, 1, 0, 1]

d.

Error

Answer: (b).[2, 4, 8, 16, 32 ]

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown?