All problems
MediumFunctions
map() — apply a function
Square every number in a list using `map`.
- #map
- #lambda
Sample input
[1, 2, 3, 4]
Sample output
[1, 4, 9, 16]
higher-order-map.py
Output
Press "Run code" to execute.
Loading…
Square every number in a list using `map`.
[1, 2, 3, 4]
[1, 4, 9, 16]
Press "Run code" to execute.