The list is the most flexible core data type in Python, it represents a collection of ordered elements.

Lists are mutable meaning that operations can be performed on them in place i.e without creating a new list.

The reverse() method is used to reverse the order of elements in the list. The reversing happens to  the actual list meaning that the original list gets modified.

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

#reverse the elements
mylist.reverse()
print(mylist)

The syntax of the reverse() method is as shown below:

lst.reverse()

The reverse() method takes no argument, it simply reverses the elements and returns None.

mylist = ['Python', 'Java', 'C++', 'Ruby']

#reverse the list
mylist.reverse()

print(mylist)

reverse() vs reversed() for reversing a list

Python also contains a builtin function called reversed() but unlike the reverse() method, it does not perform the reverse operation in-place instead, it creates an iterator object that accesses the list elements in the reverse order.

Using the reversed() function

mylist = ['one', 'two', 'three', 'four', 'five']

rev_mylist = list(reversed(mylist))
print(rev_mylist)

#the original list remains unchanged
print('Original: ', mylist)

In the above example, we used the reversed() function to iterate the list elements in reverse order, we used the builtin list() function to create a new list from the values yielded by the iterator. The original list remains unchanged. 

reverse() vs Slicing for reversing a list

Another convenient way of reversing a list is by using slicing with negative indices. This approach leads to creation of a new list, which is a reverse version of the original list. To do this, you need to specify the range of indices starting from the length of the list, decrementing by 1 each step, to 0.

mylist = ['one', 'two', 'three', 'four', 'five']

#create a reversed version
rev_mylist = mylist[::-1]
print(rev_mylist)

#the original list remains unchanged
print('Original: ', mylist)

In the above example,  this slice creates a new list in reverse order by starting at the end of the list and taking every item, in steps of -1. This means that the last item in the original list becomes the first in the new list, and the first item becomes the last.