Avsnitt 2. Kapitel 7
single
Challenge: Lambda with Filter
Svep för att visa menyn
Uppgift
Svep för att börja koda
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 2. Kapitel 7
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal