map function using lambda in python

Do you want to know the information regarding “map function using lambda in python”. If yes, you’re in the correct post.

map function using lambda in python

#filter function 

nums1 = [2,3,5,6,76,4,3,2]


bads = list(filter(lambda x: x>4, nums1))
print(bads)
# Map function 

nums1 = [2,3,5,6,76,4,3,2]
sq = list(map(lambda a : a*a, nums1))
print(sq)

Conclusion

I hope this post helps you to know about “map function using lambda in python”. If you have any queries regarding this article please let us know via the comment section. Share this tutorial with your friends & family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment