Easy Way to Reverse a List in Python

In this tutorial, you will learn how you can easily reverse the elements of a list in Python.

Python List reverse() method

You can reverse a list with the help of the reverse() method. This method doesn’t take any parameters or arguments.

It just updates the existing list in reverse form, it does not return any value.

>>> a = [1, 2, 3, 'Hello', 5.6]
>>> a.reverse()
>>> print(a)
[5.6, 'Hello', 3, 2, 1]

Leave a Reply

Your email address will not be published. Required fields are marked *