🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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)?

  1. A."kiwi"
  2. B."banana"
  3. C."fig"
  4. 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 →