In this article, you’ll see how to reverse a list in Python. The reverse method is used to reverse all the elements of a list. I highly recommend you get the “Python Crash Course Book” to learn Python.
a = [9, 20, 25, 10, 15] a.reverse() print(a)
Output:
[15, 10, 25, 20, 9]