Python Tutoring Online
 Home

Python List reverse() Method: Syntax and Examples

The Python list reverse() method is used to reverse the order of elements in a list. It changes the position of every element so that the last element becomes the first, the second-last element becomes the second, and the first element becomes the last.

The reverse() method is particularly useful when you need to process or display the elements of a Python list in the opposite order without sorting them.

An important feature of list.reverse() is that it modifies the original list in place. It does not create a new list, and the method returns None.

In this tutorial, you will learn how to use the Python reverse() method, understand its syntax, reverse lists of numbers and strings, understand reverse() versus reversed(), compare reverse() with list slicing and sort(), and learn common mistakes made by beginners.

Need Help Learning Python?

Understanding Python lists and list methods is an essential part of learning Python programming. Reversing lists is useful in data processing, loops, algorithms, sequence manipulation, and many programming projects.

If you are learning Python and need help with lists, functions, loops, assignments, data structures, or programming projects, one-to-one Python tutoring can help you learn with practical examples.

Get Python Tutoring Help

What Does reverse() Do in Python?

The reverse() method reverses the current order of elements in a Python list. It does not sort the elements and does not change their values.

For example, consider this list:

numbers = [10, 20, 30, 40]

After calling:

numbers.reverse()

the list becomes:

[40, 30, 20, 10]

Notice that the values themselves have not been changed. Their positions have been reversed.

This is different from sorting. Sorting arranges elements according to their values, while reverse() simply reverses the order in which the elements currently appear.

Python List reverse() Syntax

list.reverse()

The reverse() method does not require any arguments or parameters.

  • list – The Python list whose elements you want to reverse.
  • Parameters: None
  • Return value: None
  • Effect: The original list is modified in place.

Example 1: Reverse a List of Numbers

The simplest way to reverse a Python list is to call reverse().

Python
numbers = [10, 20, 30, 40]

numbers.reverse()

print(numbers)

Output

[40, 30, 20, 10]

The first element, 10, moves to the last position, while the last element, 40, becomes the first element.

Example 2: Reverse a List of Strings

The reverse() method works with lists containing strings as well as numbers.

Python
fruits = ["apple", "banana", "cherry"]

fruits.reverse()

print(fruits)

Output

['cherry', 'banana', 'apple']

The method reverses the order of the strings. It does not sort them alphabetically.

Example 3: Reverse a List of Names

You can use reverse() to process a list of names from the last name to the first name.

Python
students = ["Ali", "Sara", "John", "David"]

students.reverse()

print(students)

Output

['David', 'John', 'Sara', 'Ali']

This can be useful when processing records in reverse order or displaying recent items before older items.

Example 4: Reverse a List Created with a Loop

A list does not need to be created manually before using reverse(). You can create the list dynamically and then reverse it.

Python
numbers = []

for i in range(1, 6):
    numbers.append(i)

numbers.reverse()

print(numbers)

Output

[5, 4, 3, 2, 1]

The loop first creates the list [1, 2, 3, 4, 5]. The reverse() method then changes its order to [5, 4, 3, 2, 1].

Example 5: Reverse a List of Boolean Values

The reverse() method can be used with a list containing Boolean values as well.

Python
values = [True, False, True, False]

values.reverse()

print(values)

Output

[False, True, False, True]

The method simply changes the order of the elements. It does not change True into False or vice versa.

Example 6: Reverse a List Containing Different Values

A Python list can contain different types of objects, and reverse() can reverse their positions without comparing their values.

Python
items = [10, "Python", True, 25.5]

items.reverse()

print(items)

Output

[25.5, True, 'Python', 10]

This is different from sorting, because reversing a list does not require Python to compare the elements with one another.

Does reverse() Modify the Original List?

Yes. The reverse() method changes the original list directly. This is known as an in-place operation.

Python
numbers = [1, 2, 3, 4]

numbers.reverse()

print(numbers)

Output

[4, 3, 2, 1]

The variable numbers still refers to the same list, but the order of its elements has been changed.

What Does reverse() Return?

The reverse() method returns None. It does not return the reversed list.

Python
numbers = [1, 2, 3]

result = numbers.reverse()

print(result)
print(numbers)

Output

None
[3, 2, 1]

The reversed list is stored in the original variable numbers. The variable result contains None.

Common Mistake: Assigning reverse() to a Variable

A common beginner mistake is expecting reverse() to return a new list.

For example:

numbers = [1, 2, 3]

reversed_numbers = numbers.reverse()

print(reversed_numbers)

The output is:

None

Instead, use:

numbers = [1, 2, 3]

numbers.reverse()

print(numbers)

If you need a separate reversed list, use reversed() or list slicing.

Reverse a List Without Modifying the Original List

Sometimes you need the reversed version of a list while keeping the original list unchanged. In that situation, do not use list.reverse() directly.

One simple option is list slicing using [::-1].

Python
numbers = [1, 2, 3, 4]

reversed_numbers = numbers[::-1]

print(reversed_numbers)
print(numbers)

Output

[4, 3, 2, 1]
[1, 2, 3, 4]

The slicing expression creates a new list in reverse order, leaving the original list unchanged.

How to Reverse a List Using reversed()

Python also provides the built-in reversed() function. Unlike list.reverse(), the reversed() function does not modify the original list.

Python
numbers = [1, 2, 3, 4]

reversed_numbers = list(reversed(numbers))

print(reversed_numbers)
print(numbers)

Output

[4, 3, 2, 1]
[1, 2, 3, 4]

The reversed() function returns a reverse iterator. Using list() converts that iterator into a new list.

Difference Between reverse() and reversed()

Feature reverse() reversed()
Type List method Built-in function
Original list Modified Not modified
Return value None Reverse iterator
Creates a new list? No Not by itself
Can be used in iteration? Not directly Yes

Example: reverse() vs reversed()

Python
numbers = [1, 2, 3]

numbers.reverse()

print(numbers)

Output

[3, 2, 1]

Here, reverse() changes the original list.

With reversed():

Python
numbers = [1, 2, 3]

print(list(reversed(numbers)))

print(numbers)

Output

[3, 2, 1]
[1, 2, 3]

The original list remains unchanged.

Difference Between reverse() and List Slicing

Both reverse() and [::-1] can be used to obtain a list in reverse order, but they behave differently.

Method Changes Original List? Creates New List?
list.reverse() Yes No
list[::-1] No Yes
list(reversed(list)) No Yes

Difference Between reverse() and sort()

The reverse() and sort() methods are both Python list methods, but they perform completely different operations.

Feature reverse() sort()
Purpose Reverses the current order Sorts elements according to their values
Changes original list? Yes Yes
Returns a list? No No
Parameters None key, reverse

Example: reverse() vs sort()

Suppose the list is:

numbers = [30, 10, 40, 20]

Using reverse():

numbers.reverse()

produces:

[20, 40, 10, 30]

The existing order has simply been reversed.

Using sort():

numbers.sort()

produces:

[10, 20, 30, 40]

The values have been arranged numerically.

reverse() vs sort(reverse=True)

Another common beginner mistake is assuming that reverse() and sort(reverse=True) do the same thing. They do not.

Consider:

numbers = [30, 10, 40, 20]

Using:

numbers.reverse()

produces:

[20, 40, 10, 30]

But:

numbers.sort(reverse=True)

produces:

[40, 30, 20, 10]

reverse() reverses the existing order, whereas sort(reverse=True) sorts the values from largest to smallest.

Using reverse() with a Loop

A reversed list can be processed with a for loop after calling reverse().

Python
numbers = [1, 2, 3, 4, 5]

numbers.reverse()

for number in numbers:
    print(number)

Output


5
4
3
2
1

This is useful when a program needs to process list elements from the last element toward the first.

Processing a List in Reverse Without Changing It

If you want to loop through a list in reverse order while preserving the original list, reversed() is often convenient.

Python
numbers = [1, 2, 3, 4, 5]

for number in reversed(numbers):
    print(number)

print(numbers)

Output


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

This approach is useful when you only need to process the elements in reverse order and do not want to modify the list.

Reverse an Empty List

Calling reverse() on an empty list does not produce an error. The list simply remains empty.

Python
numbers = []

numbers.reverse()

print(numbers)

Output

[]

Reverse a Single-Element List

A list containing only one element also remains unchanged because there is no second element to change its position with.

Python
numbers = [100]

numbers.reverse()

print(numbers)

Output

[100]

Reverse a List with Duplicate Values

The reverse() method also works normally when a list contains duplicate elements.

Python
numbers = [1, 2, 2, 3, 4, 2]

numbers.reverse()

print(numbers)

Output

[2, 4, 3, 2, 2, 1]

The duplicate values are not changed or removed. Their positions are simply reversed along with the rest of the list.

Reverse a List of Lists

A Python list can contain other lists. The reverse() method reverses the order of the inner list objects, but it does not reverse the contents of each inner list.

Python
numbers = [[1, 2], [3, 4], [5, 6]]

numbers.reverse()

print(numbers)

Output

[[5, 6], [3, 4], [1, 2]]

Notice that [1, 2] itself has not become [2, 1]. Only the order of the outer list has been reversed.

How to Reverse Every Inner List

If you need to reverse the contents of each nested list as well, you must perform an additional operation.

Python
numbers = [[1, 2], [3, 4], [5, 6]]

for row in numbers:
    row.reverse()

print(numbers)

Output

[[2, 1], [4, 3], [6, 5]]

Here, reverse() is called separately on every inner list.

Reverse a List Using Slicing

Python list slicing provides another concise way to create a reversed copy of a list.

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

reversed_numbers = numbers[::-1]

print(reversed_numbers)

Output:

[5, 4, 3, 2, 1]

The ::-1 slice means that Python traverses the list using a step of -1.

When Should You Use reverse()?

Use the reverse() method when you have a list and want to change its existing order directly.

Common situations include:

When Should You Use reversed()?

Use reversed() when you want to traverse an object in reverse order without modifying the original list.

For example:

for item in reversed(items):
    print(item)

This is particularly useful when you only need reverse-order iteration.

When Should You Use [::-1]?

Use [::-1] when you want a new reversed list and prefer the concise Python slicing syntax.

reversed_items = items[::-1]

The original list remains unchanged.

Python reverse() Time Complexity

Reversing a list requires Python to process the elements in the list. Therefore, the time complexity of list.reverse() is O(n), where n is the number of elements in the list.

The operation is performed in place, so reverse() does not require creating a separate list containing the reversed elements.

For most everyday Python programs, reverse() is an efficient way to reverse an existing list.

Common Uses of Python List reverse()

The reverse() method has a wide range of practical uses in Python programming.

Common Beginner Mistakes with reverse()

Mistake 1: Expecting reverse() to Return a List

The reverse() method returns None. It modifies the original list instead.

Mistake 2: Confusing reverse() with reversed()

reverse() is a list method that changes the list. reversed() is a built-in function that returns a reverse iterator without modifying the original list.

Mistake 3: Confusing reverse() with sort(reverse=True)

reverse() simply reverses the current order. It does not sort the values.

Mistake 4: Forgetting That reverse() Changes the List

If you need to preserve the original order, use reversed() or [::-1] instead.

Mistake 5: Using reverse() When You Need Descending Sort

If the list is not already sorted and you need values from largest to smallest, use:

numbers.sort(reverse=True)

Do not assume that:

numbers.reverse()

will produce descending numerical order. It only reverses whatever order the list already has.

Python reverse() Method: Key Points to Remember

Frequently Asked Questions About Python List reverse()

What is reverse() in Python?

The reverse() method is a Python list method that reverses the order of elements in the original list.

How do I reverse a list in Python?

Call the reverse() method on the list:

numbers = [1, 2, 3, 4]

numbers.reverse()

print(numbers)

The result is [4, 3, 2, 1].

What is the syntax of Python list reverse()?

The syntax is:

list.reverse()

The method does not require any arguments.

Does reverse() modify the original list?

Yes. reverse() changes the original list directly. It is an in-place list operation.

What does reverse() return in Python?

The reverse() method returns None. The original list itself is modified.

How do I reverse a list without changing the original list?

You can use list slicing:

reversed_list = numbers[::-1]

Or use:

reversed_list = list(reversed(numbers))

What is the difference between reverse() and reversed()?

reverse() modifies the original list and returns None. reversed() returns a reverse iterator and does not modify the original list.

What is the difference between reverse() and sort()?

reverse() changes the current order of elements, while sort() arranges elements according to their values.

What is the difference between reverse() and sort(reverse=True)?

reverse() reverses the existing order. The sort(reverse=True) operation sorts the values into descending order.

Can reverse() reverse a list of strings?

Yes. The reverse() method works with lists containing strings and reverses their positions.

Can reverse() reverse an empty list?

Yes. Calling reverse() on an empty list leaves the list as [].

Can reverse() be used with duplicate elements?

Yes. Duplicate elements are handled normally. Their positions are reversed along with the other elements.

What is the time complexity of reverse() in Python?

The time complexity of list.reverse() is O(n), where n is the number of elements in the list.

Does reverse() create a new list?

No. The reverse() method modifies the existing list in place. If you need a new reversed list, use [::-1] or convert the result of reversed() to a list.

Related Python List Tutorials

Learn More Python List Methods

The reverse() method is one of many built-in Python list methods that can help you manipulate and process list data.

Learn how to create, access, modify, search, sort, copy, reverse, and process Python lists with practical examples in the complete Python Lists Tutorial.

Learn Python Lists




Stuck Learning Python?

Struggling with Python syntax, assignments or debugging errors? Learning alone can be frustrating.

Get 1-on-1 Python tutoring and learn faster with clear explanations, real examples and live help.

    Get Python Tutoring

PythonTutor.net

Home    Tutorial     Online Live Trainings    Contact Us           © 2026 All rights reserved by www.PythonTutor.net