← Quiz: Comprehensions and Lambda: all 15 questions
Quiz: Comprehensions and Lambda · Question 4 of 15
What is max(["kiwi", "banana", "fig"], key=len)?
What is max(["kiwi", "banana", "fig"], key=len)?
- A."kiwi"
- B."banana"
- C."fig"
- D.6
Answer & explanation
Correct answer: "banana"
key=len compares by length; "banana" is the longest.
Can you get the rest right without peeking?
Take the timed Quiz: Comprehensions and Lambda quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →