Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

map and filter in python

>>> doubled_odds = map(lambda n: n * 2, filter(lambda n: n % 2 == 1, numbers))
>>> doubled_odds = [n * 2 for n in numbers if n % 2 == 1]
Source by treyhunner.com #
 
PREVIOUS NEXT
Tagged: #map #filter #python
ADD COMMENT
Topic
Name
8+6 =