Answers for "map and filter in python"

0

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]
Posted by: Guest on June-10-2021

Code answers related to "map and filter in python"

Browse Popular Code Answers by Language