adplus-dvertising
frame-decoration

Question

What is the output of the following code?
b=[2,3,4,5]
a=list(filter(lambda x:x%2,b))
print(a)

a.

[2,4].

b.

[ ].

c.

[3,5].

d.

Invalid arguments for filter function

Posted under Python

Answer: (c).[3,5].

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 following code?