Question · Python course · Module 2: Data Structures

The sort() Method

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

Answer options

  • sort() modifies the list, sorted() returns a new one
  • sorted() modifies the list, sort() returns a new one
  • They work identically
  • sort() sorts ascending, sorted() sorts descending
Show the answer

Correct answer:

  • sort() modifies the list, sorted() returns a new one