R

Rati Dubey • 8.55K Points
Tutor III

Q. Which of the following functions can be used to sort a list in Python?

  • (A) order()
  • (B) sort()
  • (C) sorted()
  • (D) Both sort() and sorted()
  • Correct Answer - Option(D)
  • Views: 12
  • Filed under category Python

Explanation by: Rati Dubey
The `sort()` method sorts a list in place, while `sorted()` returns a new sorted list.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics