user
Create a function to sort a list from highest to lowest.
Input: [10, 30, 20, 50, 40]
Output:
assistant
def sort_list(arr): 
    arr.sort(reverse=True) 
    return arr
sort_list([10, 30, 20, 50, 40])
Output: [50, 40, 30, 20, 10]