Python list.reverse() Method

Beginner
6 min read
Updated: Nov 2026
3 examples
list method

Definition

reverse() flips the order of the items: the last becomes the first and the first becomes the last. It changes the list in place and returns None.

It does not sort anything and does not touch the items themselves. For a reversed copy use lst[::-1]; to loop backward without copying, use reversed(), which returns an iterator.

list.reverse() is an instance method of the built-in list type: call it on a list with dot notation, such as history.reverse(...). No import is needed.

Syntax

Call it with no arguments on its own line.

python
lst.reverse()
CallWhat it does
[1, 2, 3].reverse()Returns None; the list becomes [3, 2, 1].
[3, 1, 2].reverse()Returns None; the list becomes [2, 1, 3]: flipped, not sorted.
lst[::-1]A new list in reverse order; lst itself is unchanged.

For largest-to-smallest order use sort(reverse=True); reversing an unsorted list only mirrors it.

Method signatures
python
list.reverse()
# returns: None; the same list now holds its items in reverse order

Parameters

reverse() takes no parameters.

Return Value

Return ValueDescription
NoneAlways None. The list keeps its length and items, in the opposite order.

Python Examples

Example 1 — Show Browser History With the Newest Page First

Pages are stored in visit order; reversing the list puts the latest visit at index 0.

python
history = ["home", "search", "product", "cart"]

result = history.reverse()
print(result)
print(history)
print("most recent:", history[0])

How It Works

  1. Nothing returned. result holds None, the return value of every in-place list method except pop().
  2. Flipped in place. The same history list now runs from the last page visited to the first.
  3. Index 0 is now the latest. After the flip, "cart" sits at the front.

Example 2 — Run a Launch Countdown Three Ways

Compare a reversed slice, the reversed() iterator, and the in-place method on the same numbers.

python
countdown = [1, 2, 3, 4, 5]

backwards = countdown[::-1]
print(backwards, countdown)

print(" ".join(str(n) for n in reversed(countdown)))
print(list(reversed(countdown)) == backwards)

countdown.reverse()
print(countdown == backwards, countdown is backwards)

How It Works

  1. Slice makes a copy. countdown[::-1] builds a new reversed list and leaves countdown in its original order.
  2. Iterator for looping. reversed() walks the list backward without copying it; joining the numbers prints the countdown on one line.
  3. Same items either way. Turning the iterator into a list gives exactly what the slice gave.
  4. In place, different object. After countdown.reverse() the list equals backwards, but it is still a separate list.

Example 3 — Mirror and Rotate a Small Pixel Grid

Reversing each row mirrors the grid left to right; reversing the outer list flips the row order.

python
grid = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

for row in grid:
    row.reverse()
print(grid)

grid.reverse()
print(grid)

grid.reverse()
for row in grid:
    print(row[::-1])

How It Works

  1. Each row in place. Calling reverse() on every inner list mirrors the grid horizontally.
  2. Outer list only. grid.reverse() swaps the order of the rows but leaves each row's contents alone; together the two steps turn the grid by 180 degrees.
  3. Undo by reversing again. A second grid.reverse() restores the row order from before.
  4. Read rows backward. Printing each row[::-1] shows the original rows without changing the grid again.

Frequently Asked Questions

None. It reverses the list in place, so use the list itself afterwards instead of the return value.
lst.reverse() flips the list itself. reversed(lst) leaves the list alone and returns an iterator that yields the items from last to first.
Use lst[::-1] or list(reversed(lst)). Both create a new list and keep the original order intact.
No. It only mirrors the current order. For descending order use lst.sort(reverse=True) or sorted(lst, reverse=True).
No, strings and tuples are immutable and have no reverse() method. Use slicing such as text[::-1], or reversed() to loop backward.

Next: list.sort()

Sort the list in place, with an optional key function and reverse flag.

sort() →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful