1. Home
  2. Data Science
  3. Python
  4. What is the difference between sort() and sorted() in…

Added 25 Nov 2026

What is the difference between sort() and sorted() in Python?

  1. sort() returns a new list; sorted() changes in place
  2. They are identical
  3. sorted() works only on strings
  4. sort() changes the list in place; sorted() returns a new list Correct answer

Correct answer

D. sort() changes the list in place; sorted() returns a new list

MCQSEXAM

Explanation

list.sort() mutates the original list, while sorted() works on any iterable and returns a new list.

Reference

Asked in: Python Interview Lists

https://docs.python.org/3/tutorial/datastructures.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs