map
and filter
are two popular methods to manipulate a Python iterable.
If you want to get only the elements of an iterable that satisfy the given condition, use filter
.
If you want to apply a function to each element of an iterable, use map
.
map
and filter
are two popular methods to manipulate a Python iterable.
If you want to get only the elements of an iterable that satisfy the given condition, use filter
.
If you want to apply a function to each element of an iterable, use map
.