how to sort the list in decreasing order in python code example
Example 1: sort in python'
arr = [1,4,2,7,5,6]
#sort in ascending order
arr = arr.sort()
#sort in descending order
arr = arr.sort(reverse = True)
Example 2: sort list in python
List_name.sort()
This will sort the given list in ascending order.