Objective
Create a Python program that filters and transforms a list of numbers with filter and map.
Instructions
- Read a line with integers separated by spaces.
- With
filterand alambdafunction, keep only the positive numbers (greater than 0). - With
mapand anotherlambda, multiply each of them by 2. - Show the results on a single line, separated by a space, in the same order as the input.
- If there is no positive number, show
None.
3 -1 4 0 -5 2
6 8 4
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise