Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Lambda with Filter | Higher-Order Functions and Lambdas
Functional Programming Concepts in Python
Sektion 2. Kapitel 7
single

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 lambda function as the filtering criteria.
  • Use filter to apply the lambda function to the input list.
  • Return a list containing only the strings whose length is greater than 3.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 7
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

some-alt