Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python #difference #filter #map
ADD COMMENT
Topic
Name
5+1 =