ProgrammingHardTCS NQT · Accenture

What is printed?

What is printed?
print(max([], default=-1), min(range(0), default='e'))
  1. A. None e
  2. B. -1 None
  3. C. -1 e
  4. D. 0 e

Correct answer: C. -1 e

Both max and min accept a default that is returned for an empty iterable. The default -1 is returned for max, and 'e' for min.

More Python Programming questions

Exams that ask this topic