Answers for "Python difference between filter and map"

0

Python difference between filter and map

nums = [1, 2, 3, 4, 5]
list(map(lambda x: x**2, nums))
#1 4 9 16 25
list(filter(lambda x: x%2==0, nums))
#2 4 6 8
Posted by: Guest on May-24-2021

Code answers related to "Python difference between filter and map"

Python Answers by Framework

Browse Popular Code Answers by Language