Section 2. Chapter 6
single
Challenge: Lambda with Map
Swipe to show menu
Task
Swipe to start coding
Write a lambda function that returns the cube of its argument and use it with map to process a list.
- The
lambdafunction must return the cube of its argument. - Use
mapto apply the lambda function to each element in thenumberslist. - Store the result as a list in the
cubed_numbersvariable.
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat