There are two methods to sort any list. sort() and reverse(). Both of these can work with numbers and strings.
You can use this method to sort a list.
Refer to code below and experiment with it.
lst = [5, 3, 1, 2, 4]
print(lst)
lst.sort()
print(lst) # outputs: [1, 2, 3, 4, 5]
You can use this method to reverse the list. Refer to code below and experiment with it. Expected output : [4, 2, 1, 3, 5]
lst = [5, 3, 1, 2, 4]
print(lst)
lst.reverse()
print(lst)