list.reverse()

list.reverse()
Returns: None · Updated March 14, 2026 · List Methods
lists methods mutation

The .reverse() method reverses the elements of a list in-place. This means it modifies the original list directly rather than creating a new one. The method returns None, so you don’t assign its result to a variable.

Syntax

list.reverse()

Parameters

None. This method takes no parameters.

Examples

Basic usage

Reverse a list in-place:

numbers = [1, 2, 3, 4, 5]
numbers.reverse()
print(numbers)
# [5, 4, 3, 2, 1]

Reversing a list of strings

fruits = ["apple", "banana", "cherry"]
fruits.reverse()
print(fruits)
# ['cherry', 'banana', 'apple']

Reversing works on any mutable sequence

mixed = [1, "two", 3.0, [4, 5]]
mixed.reverse()
print(mixed)
# [[4, 5], 3.0, 'two', 1]

Important: .reverse() returns None

A common mistake is trying to use the return value:

numbers = [1, 2, 3]
reversed_numbers = numbers.reverse()
print(reversed_numbers)
# None
print(numbers)
# [3, 2, 1]

Common Patterns

Getting a reversed copy without modifying original

If you need a reversed copy while keeping the original intact, use slicing:

original = [1, 2, 3, 4, 5]
reversed_copy = original[::-1]
print(original)
# [1, 2, 3, 4, 5]
print(reversed_copy)
# [5, 4, 3, 2, 1]

Or use the built-in reversed() function:

original = [1, 2, 3, 4, 5]
reversed_list = list(reversed(original))
print(original)
# [1, 2, 3, 4, 5]
print(reversed_list)
# [5, 4, 3, 2, 1]

Iterating in reverse order

For iterating backwards without modifying the list:

colors = ["red", "green", "blue"]
for color in reversed(colors):
    print(color)
# blue
# green
# red

Performance Note

  • .reverse() is O(n) where n is the number of elements
  • It performs an in-place swap, moving each element exactly once
  • Memory usage is O(1) — no additional list is created
import timeit

large_list = list(range(10000))
t = timeit.timeit(lambda: large_list.copy().reverse(), number=1000)
print(f"Time for 1000 reverses: {t:.4f}s")

See Also