Descending Order List Sort Function

  • Share this:

Code introduction


This function takes a list `lst` as an argument and returns a new list containing the same elements as the original list, but sorted in descending order.


Technology Stack : Built-in function sorted

Code Type : Function

Code Difficulty : Intermediate


                
                    
def sort_list_descending(lst):
    return sorted(lst, reverse=True)