Seksjon 2. Kapittel 6
single
Challenge: Lambda with Map
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 6
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår