python 3 sort descending order code example
Example 1: python sorted descending
sorted_list = sorted(list) # ascending (default)
sorted_list = sorted(list, reverse=True) # descending
Example 2: how to sort list in descending order in python
#1 Changes list
list.sort(reverse=True)
#2 Returns sorted list
sorted(list, reverse=True)