Sektion 2. Kapitel 7
single
Challenge: Lambda with Filter
Stryg for at vise menuen
Opgave
Swipe to start coding
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
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 7
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat