Seksjon 2. Kapittel 7
single
Challenge: Lambda with Filter
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
Apply your understanding of lambda functions and the filter function to solve this challenge. Your goal is to extract all strings longer than 3 characters from a given list of strings.
- Use a
lambdafunction as the filtering criteria. - Use
filterto apply the lambda function to the input list. - Return a list containing only the strings whose length is greater than 3.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 7
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