Computer Science, asked by krishnachaturvedi352, 8 months ago

Which method is used to arrange the items of a list in ascending order in python?

1.sort()

2.arrange()

3.sort(reverse=True)

4.ascend()

Answers

Answered by mahyekchakraborty1
1

Answer:

sort

The sort() method sorts the elements of a given list in a specific ascending or descending order. The syntax of the sort() method is: list.sort(key=..., reverse=...) Alternatively, you can also use Python's built-in sorted() function for the same purpose.

Explanation:

Similar questions