Answer:
myList.sort() ->sort the elements in ascending order
myList.sort(reverse=True) -> sort the elements in descending order
Step-by-step explanation:
Hi,
To sort the elements of a list, we can use the sort() function in Python. This function can optionally receive the "reverse" argument which specifies whether the sorting is done in descending order. If it is called without this argument, the sorting is by default in ascending order. If the "reverse=True" argument is specified, then the sorting will be done in descending order.
The line of code is:
myList.sort() -> sort the elements in ascending order
myList.sort(reverse=True) -> sort the elements in descending order
Good luck!