01 / 07
Narrowing down this time
map was for doing the same thing to everything. This is the other one: keeping only what you want.
With a comprehension you put an if on the end. The built-in function that does the same job is filter.
numbers = [3, -1, 5, -2]print([x for x in numbers if x > 0])Result
[3, 5]