PRACTICE / UNDERSTAND / REPEAT
Python practice question
Practice collections with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
What does `list.sort()` return?
Answer & explanation
Answer: None; it sorts the list in place
`list.sort()` mutates the list and returns `None`; `sorted(iterable)` returns a new list.