reverse reverses the list in-place, see the manual, while [::-1] gives a new list in reversed order.

Try print(p) after calling p.reverse(), you'll see the difference.

Answer from Yu Hao on Stack Overflow
Top answer
1 of 2
26

reverse reverses the list in-place, see the manual, while [::-1] gives a new list in reversed order.

Try print(p) after calling p.reverse(), you'll see the difference.

2 of 2
11

Regarding reversing list in python, the 3 main ways:

  • the built-in function reversed(seq) that will return a reverse iterator which is an object representing the stream of data that will return successive items of this steam. Generating this reverse iterator is O(1) in time/space complexity and using it to iterate through the elements of a list will be O(N), O(1) in time/space complexity where N is the length of the list. This is the approach you want to go for if you simply want to iterate on the reversed list without modifying it. This approach gives the best performances in this case.

  • p.reverse() reverses the list in-place. The operation is O(N), O(1) in time/space complexity as it will have to go through half of the elements of the list to reverse them and it doesn't store the results in a new list. p.reverse() will return None and the elements will be directly reversed in p after this instruction. This approach is good if you do NOT need to keep the original list and you have several passes/operations to do on the elements of the reversed list and if you have to save the processed reversed list.

  • Using slicing [::-1] creates a new object of the list/a copy in reversed order. The operation is O(N), O(N) in space/time complexity as you have to copy all the elements of the list in the new one and this new list will also consume the same amount of space as the original list. In terms of reference, you will have a new object created so even if print(p == x) returns True, print(p is x) will return False as the two objects even if they share the same values have different references. This approach is great if you need to keep the original list and have a reversed copy of it stored in a different object for further processing.

To summarize, depending on your use case you will have to use one of those 3 approaches that have slightly different objectives and completely different performances.

🌐
Reddit
reddit.com › r/learnprogramming › why does [::1] reverse a string in python?
r/learnprogramming on Reddit: Why does [::1] reverse a string in Python?
September 21, 2023 -

For example:

txt = "Hello World"[::-1]

Isn't the splice syntax [start : stop: step]? And default of start and stop are the beginning and end of the string? So that would make the above start at the beginning, stop at the end, but step by -1. That feels like it would start at the beginning, then step backwards to...before the beginning of the string?

Sorry for the silly question, I just can't figure out why this syntax works the way it does.

🌐
Reddit
reddit.com › r/python › reversed vs [::-1]
r/Python on Reddit: reversed vs [::-1]
June 24, 2014 -

I always thought that slice operation for reversing of the list or something else is fastest one. But after watching "Transforming Code into Beautiful, Idiomatic Python" on youtube I have decided to compare slice and reversed method to each other. Obviously reversed is faster than slicing when we assign the result to new variable. But when we want just to reverse without having new variable results are roughly the same or even better for slicing . Here is the graph and tested code

graphs!

import timeit
example = '''
d = [1,2,3,4,5,6,7,8,9,0]
d = reversed(d)
'''
example2 = '''
d = [1,2,3,4,5,6,7,8,9,0]
d = d[::-1]
'''
print(timeit.timeit(example, number=100000000))
print(timeit.timeit(example2, number=100000000))
  
  
import timeit
example = '''
d = [1,2,3,4,5,6,7,8,9,0]
new_var = reversed(d)
'''
example2 = '''
d = [1,2,3,4,5,6,7,8,9,0]
new_var = d[::-1]
'''
print(timeit.timeit(example, number=100000000))
print(timeit.timeit(example2, number=100000000))

Should programmer choose carefully between slicing and reversed?

🌐
GeeksforGeeks
geeksforgeeks.org › python › python-reversed-vs-1-which-one-is-faster
Python - reversed() VS [::-1] , Which one is faster? - GeeksforGeeks
July 15, 2025 - This means they take the same amount of time to reverse a string, regardless of its length. However, in practice, A[::-1] may be slightly faster than reversed() for large input sizes. This is because reversed() creates an iterator object, which can be marginally slower than directly accessing the characters in the string.
🌐
W3Schools
w3schools.com › python › ref_list_reverse.asp
Python List reverse() Method
Tutorial: Sort Python Lists · Method: sort() The built-in function reversed() returns a reversed iterator object. ❮ List Methods · ★ +1 · Sign in to track progress · REMOVE ADS · PLUS · SPACES · GET CERTIFIED · FOR TEACHERS · BOOTCAMPS ...
🌐
Quora
quora.com › Why-does-my_list-1-reverse-a-list-in-python-Can-someone-explain-to-me-the-syntax
Why does my_list [::-1] reverse a list in python? Can someone explain to me the syntax? - Quora
That says: start at the beginning, go through and include the end, with a stride of -1. Since the stride is negative, Python swaps the start and end points so that the first offset is the last character and the last offset is the first character ...
🌐
ZetCode
zetcode.com › python › reverse
Python reverse - reversing Python sequences
def reverse_string(word): rev = '' n = len(word) while n > 0: n -= 1 rev += word[n] return rev · In the function, we use a while loop to build the new string in reverse order. The __reversed__ magic method implementation should return a new iterator object that iterates over all the objects ...
Find elsewhere
🌐
W3Schools
w3schools.com › python › python_howto_reverse_string.asp
How to reverse a String in Python
There is no built-in function to reverse a String in Python. The fastest (and easiest?) way is to use a slice that steps backwards, -1.
🌐
Codecademy
codecademy.com › article › how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
Learn how to reverse a list in Python using `.reverse()`, `reversed()`, slicing, the two-pointer method, loops, and recursion with examples.
🌐
Programiz
programiz.com › python-programming › methods › list › reverse
Python List reverse()
# Syntax: reversed_list = systems[start:stop:step] reversed_list = systems[::-1] # updated list print('Updated List:', reversed_list)
🌐
Python.org
discuss.python.org › ideas
Method for reversing strings - Ideas - Discussions on Python.org
February 20, 2025 - There may be other methods like splitting the string, reversing the resulting list, and then joining it back, but that’s a bit of work! There have been several times in my QA career where I am scripting in Python and need to reverse a string, but I have to look up the [::-1] syntax because ...
🌐
Real Python
realpython.com › python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() – Real Python
June 28, 2023 - The first technique you’ll use to reverse a list involves a for loop and a list concatenation using the plus symbol (+): ... >>> digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> def reversed_list(a_list): ...
🌐
Programiz
programiz.com › python-programming › methods › built-in › reversed
Python reversed()
country_capitals = { 'England': 'London', 'Canada': 'Ottawa', 'Germany': 'Berlin' } # access keys in reversed order # and convert it to a tuple country = tuple(reversed(country_capitals)) print(country)
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-reversed-function
Python reversed() Method - GeeksforGeeks
February 17, 2026 - reversed() function in Python returns an iterator that accesses elements in reverse order. It does not create a new reversed copy of the sequence, making it memory-efficient.
🌐
Tutorialspoint
tutorialspoint.com › python › python_reversed_function.htm
Python reversed() Function
The Python reversed() function returns an iterator object which allows us to access the specified sequence in reverse order. This function is commonly used in the situation where we want to iterate over the elements of a sequence in reverse, without
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-reverse-string
Python Reverse String - 5 Ways and the Best One | DigitalOcean
August 3, 2022 - I executed all these functions one by one for 1,00,000 times using the timeit module and got the average of the best 5 runs. $ python3.7 -m timeit --number 100000 --unit usec 'import string_reverse' 'string_reverse.reverse_slicing("ABç∂EF"*10)' 100000 loops, best of 5: 0.449 usec per loop $ python3.7 -m timeit --number 100000 --unit usec 'import string_reverse' 'string_reverse.reverse_list("ABç∂EF"*10)' 100000 loops, best of 5: 2.46 usec per loop $ python3.7 -m timeit --number 100000 --unit usec 'import string_reverse' 'string_reverse.reverse_join_reversed_iter("ABç∂EF"*10)' 100000 lo
🌐
Mimo
mimo.org › glossary › python › list-reverse-method
Python List reverse() Method: Syntax, Methods, and Examples
This built-in tool is part of how Python efficiently walks through a list backward. The underlying name comes from the behavior of a built-in reversed mechanism, which is powered by a built-in function. When dealing with large lists and lazy evaluation. Suitable for for-loops and iterators. You can reverse a list using enumerate in a custom loop. While not the most efficient method, it’s helpful for learning or implementing specific logic. ... numbers = [1, 2, 3, 4, 5] reversed_list = [0] * len(numbers) for i, value in enumerate(numbers): reversed_list[len(numbers) - 1 - i] = value print(reversed_list) # Output: [5, 4, 3, 2, 1]
🌐
Real Python
realpython.com › ref › builtin-functions › reversed
reversed() | Python’s Built-in Functions – Real Python
class FloatRange: def __init__(self, ... # Output: 1.5 1.0 0.5 0.0 · This class allows you to iterate through an interval of floating-point numbers using a fixed increment value, step....
🌐
Plain English
python.plainenglish.io › 1-vs-reversed-which-one-is-the-smart-way-to-reverse-a-list-da6ee6c22e2d
[::-1] vs reversed() — Which One Is the Smart Way to Reverse a List? | by Leo Liu | Python in Plain English
April 24, 2025 - Reversing a list is one of the most common tasks in Python. But when it comes to choosing between [::-1] (slicing) and reversed() (built-in function), most Pythonistas have strong opinions. One camp swears by the elegance of slicing, while the other defends the efficiency of iterators.