practicepython.in
python exercises
171 exercises

Daily #21 · 19 October 2026

The longest word Easy

What does this print?

print(max(["kiwi", "plum", "fig"], key=len))
  1. Afig
  2. Bplum
  3. C['kiwi', 'plum']
  4. Dkiwi
Show the answer

D: kiwi

Why: kiwi and plum are both four letters. When there is a tie, max returns the first one it met.

Play today’s puzzle →