Which Python built-in function will you use to sort a list of numbers in ascending order?

  • arrange()
  • order()
  • sort()
  • sorted()
To sort a list of numbers in ascending order, you should use the sorted() function. The sort() method is used for in-place sorting, whereas sorted() returns a new sorted list, leaving the original list unchanged.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *