Python List reverse() Method

  • Post category:List

The reverse() method reverses the elements of the list.

In this blog post, you will learn how to use the python list reverse() method.

Step 1: Create a list

my_list = [1, 2, 3, 4, 5]

Step 2: Reverse the list

my_list.reverse()

Step 3: Print the list

print(my_list)

Output: