Python Programming - Lists - Discussion

Discussion Forum : Lists - General Questions (Q.No. 3)
3.
What is the correct way to sort a list in descending order in Python?
list.sort()
sorted(list, reverse=True)
list.sort(reverse=True)
sorted(list)
Answer: Option
Explanation:
The list.sort(reverse=True) method is used to sort a list in descending order in-place.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.