Answer to Question #329338 in Python for Shubham Tiwari

Question #329338

Python program to filter even values from list using lambda function


1
Expert's answer
2022-04-16T06:47:59-0400
a = [3, 2, 1, 4]                      # example list 
b = filter(lambda x: x % 2 == 0, a)
print(*b)                             # output: 2 4

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS