adplus-dvertising
frame-decoration

Question

Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?

a.

[x**-1 for x in [(1, 2, 3)]].

b.

[1/x for x in [(1, 2, 3)]].

c.

[1/x for x in (1, 2, 3)].

d.

error

Posted under Python

Answer: (c).[1/x for x in (1, 2, 3)].

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?