6.12.1 Change Order Of Elements In Function List Argument
Use the list.sort(reverse=True) method with the reverse=True argument. Use slicing list[::-1] to reverse the order of the list. The difference between both methods is that the first changes the list in place, and the second creates a new list with sorted elements in descending order. Here’s the example: ITS128 Challenge Activity 6.12.1 – YouTube List … Read more