Question
In Python, which comparison about Sorting, Key Functions, and Timsort is accurate?
- A key function is usually simpler and more Pythonic than comparator-style custom ordering for common application data.
- There is no practical difference in behavior, performance, or maintainability when Sorting, Key Functions, and Timsort is involved.
- The oldest option related to Sorting, Key Functions, and Timsort is always the right production choice regardless of workload or context.
- Differences around Sorting, Key Functions, and Timsort are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: A. A key function is usually simpler and more Pythonic than comparator-style custom ordering for common application data.
A key function is usually simpler and more Pythonic than comparator-style custom ordering for common application data. This is the comparison that usually separates memorization from understanding.
Track: Python