All challenges
Multiple ChoiceBeginner 30s

sorted Key Function

Choose the best answer for: sorted() key
Options
  1. 1key is the comparison function applied pairwise
  2. 2sorted doesn't accept a key and compares values
  3. 3sorted(iterable, key=len) sorts by length
  4. 4key must be a lambda, not a named function

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle