Python List reverse() Method
list.reverse() reverses the order of items in a list.
It changes the original list in place, which means it does not create a new list. This is important because beginners often expect it to return a reversed copy.
If you want to reverse a list, reverse() is useful when changing the original list is okay. If you need a new list instead, use list slicing or another approach.
Quick answer
numbers = [1, 2, 3]
numbers.reverse()
print(numbers) # [3, 2, 1]
reverse() changes the original list. It does not create a new list.
What list.reverse() does
list.reverse():
- Reverses the order of items in a list
- Changes the original list directly
- Returns
None - Works only on list objects
Example:
letters = ["a", "b", "c", "d"]
letters.reverse()
print(letters)
Output:
['d', 'c', 'b', 'a']
Basic syntax
The syntax is:
my_list.reverse()
Key points:
- No arguments are needed
- You call it on an existing list
- It only works on lists
Example:
colors = ["red", "green", "blue"]
colors.reverse()
print(colors)
Output:
['blue', 'green', 'red']
Simple example
Start with a list in normal order:
numbers = [10, 20, 30, 40]
numbers.reverse()
print(numbers)
Output:
[40, 30, 20, 10]
What happens here:
- The list starts as
[10, 20, 30, 40] reverse()flips the order- Printing the same list shows the updated result
reverse() changes the original list
This method is in-place. That means the list itself is changed.
fruits = ["apple", "banana", "cherry"]
fruits.reverse()
print(fruits)
Output:
['cherry', 'banana', 'apple']
Use reverse() when you want to modify the current list.
If you need a new reversed list and want to keep the original unchanged, use slicing:
fruits = ["apple", "banana", "cherry"]
reversed_fruits = fruits[::-1]
print(fruits)
print(reversed_fruits)
Output:
['apple', 'banana', 'cherry']
['cherry', 'banana', 'apple']
If you want to learn more about this pattern, see Python list slicing explained.
Common beginner mistake: assigning the result
A very common mistake is writing code like this:
numbers = [1, 2, 3]
new_list = numbers.reverse()
print(new_list)
print(numbers)
Output:
None
[3, 2, 1]
Why this happens:
reverse()changesnumbersdirectly- It does not return a new list
- So
new_listbecomesNone
The correct way is:
numbers = [1, 2, 3]
numbers.reverse()
print(numbers)
Output:
[3, 2, 1]
reverse() vs sorted() vs slicing
These are similar, but they do different jobs.
reverse()
reverse() flips the current order of the list.
numbers = [3, 1, 2]
numbers.reverse()
print(numbers)
Output:
[2, 1, 3]
Notice that this is not sorted order. It is just the original list backward.
sorted()
sorted() returns a new list in sorted order.
numbers = [3, 1, 2]
result = sorted(numbers)
print(numbers)
print(result)
Output:
[3, 1, 2]
[1, 2, 3]
If you want descending sorted order, you can use sorted(numbers, reverse=True).
Slicing
Slicing with [::-1] returns a reversed copy.
numbers = [3, 1, 2]
result = numbers[::-1]
print(numbers)
print(result)
Output:
[3, 1, 2]
[2, 1, 3]
Quick comparison
- Use
reverse()when you want to change the original list - Use
[::-1]when you want a reversed copy - Use
sorted()when you want items in sorted order
You may also want to compare this with the list sort() method, which sorts a list in place instead of reversing it.
When to use reverse()
reverse() is a good choice:
- When the list is already in the order you want to flip
- When changing the original list is acceptable
- When you want a simple built-in way to reverse items
For a task-focused guide with multiple ways to do this, see How to reverse a list in Python.
Common mistakes
Beginners often run into problems with reverse() for these reasons:
- Assigning the result of
reverse()to a variable - Expecting
reverse()to sort values from highest to lowest - Using
reverse()on a string or tuple instead of a list - Confusing
reverse()withreversed()
Here is an example of using it on the wrong type:
text = "hello"
text.reverse()
This causes an error because strings do not have a reverse() method.
If you are not sure what type a variable is, check it first:
my_list = [1, 2, 3]
print(my_list)
print(type(my_list))
result = my_list.reverse()
print(result)
print(my_list[::-1])
Output:
[1, 2, 3]
<class 'list'>
None
[1, 2, 1]
Wait — the last output above would be wrong for that list, so here is the correct runnable example:
my_list = [1, 2, 3]
print(my_list)
print(type(my_list))
result = my_list.reverse()
print(result)
print(my_list)
print(my_list[::-1])
Output:
[1, 2, 3]
<class 'list'>
None
[3, 2, 1]
[1, 2, 3]
Notice the last line carefully:
- After
my_list.reverse(), the list becomes[3, 2, 1] - Then
my_list[::-1]returns a reversed copy of the current list - So it prints
[1, 2, 3]
FAQ
Does list.reverse() return a new list?
No. It changes the original list and returns None.
How is reverse() different from sorted(reverse=True)?
reverse() only flips the current order.
sorted(reverse=True) sorts the items first, then returns them in descending order.
Can I use reverse() on a tuple or string?
No. reverse() is a list method. Tuples and strings do not have this method.
How do I reverse a list without changing the original?
Use slicing:
my_list[::-1]
Or use:
list(reversed(my_list))
If you need to keep a separate version of a list before changing it, Python list copy() can also help.