In Python, there are two ways of reversing a list. The first method is using a built-in function, reverse(). Refer to the below code:
lst = [10, 11, 12, 13, 14, 15]
The second way is also a built-in function, reversed(). Refer to the below code:
return [ele for ele in reversed(lst)]
lst = [1,3,7,5,9,40,34]
If you are looking for an online course to learn Python, I recommend this Python Course by Intellipaat.