[Start:stop:step] if you're going in steps by negative one, you're going backwards Answer from FriendlyRussian666 on reddit.com
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-reversing-list
Reversing a List in Python - GeeksforGeeks
Python's built-in reversed() function is another way to reverse the list. However, reversed() returns an iterator, so it needs to be converted back into a list. ... If we want to reverse a list manually, we can use a loop (for loop) to build ...
Published ย  November 26, 2025
๐ŸŒ
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)
Discussions

python - How do I reverse a list or loop over it backwards? - Stack Overflow
I find (contrary to some other suggestions) that l.reverse() is by far the fastest way to reverse a long list in Python 3 and 2. I'd be interested to know if others can replicate these timings. l[::-1] is probably slower because it copies the list prior to reversing it. More on stackoverflow.com
๐ŸŒ stackoverflow.com
Why does this "[::-1]" return a reversed list in Python? - Stack Overflow
Possible Duplicate: Good Primer for Python Slice Notation reverse a string in Python I've seen this syntax crop up in a few code snippets I've seen lately, and I'm curious as to what it does.... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Beginner question: assigning variable to list.reverse()
Any idea why assigning variable Y to this does not result in anything ยท Yes. To avoid an accident where you think you have a new, separate, list there is a convention in Python that a function which changes something in place returns None so that you canโ€™t proceed thinking you have a new thing. More on discuss.python.org
๐ŸŒ discuss.python.org
0
0
May 12, 2022
Reversing a list in Python?
I have no idea what the '::' means Please read about ranges in python. They are used all the time and you really need to understand them. There is reverse() and reversed() in python. One changes the list and the other doesn't change the list, but iterates through it from the back. More on reddit.com
๐ŸŒ r/learnprogramming
12
1
February 11, 2022
๐ŸŒ
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 ...
๐ŸŒ
Codecademy
codecademy.com โ€บ article โ€บ how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
The two-pointer approach is a manual way to reverse a list by swapping elements from both ends. It works by placing one pointer at the start of the list and another at the end, swapping their values, and moving both pointers toward the center ...
๐ŸŒ
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): ...
Find elsewhere
๐ŸŒ
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]
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-list-reverse
Python List Reverse() - GeeksforGeeks
April 25, 2025 - The reverse() method is an inbuilt method in Python that reverses the order of elements in a list.
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Beginner question: assigning variable to list.reverse() - Python Help - Discussions on Python.org
May 12, 2022 - Any idea why assigning variable Y to this does not result in anything? create a list of prime numbers x = [2, 3, 5, 7] reverse the order of list elements y=x.reverse() print(y)
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-reverse-list
Python Reverse List: How to Reorder Your Data | DataCamp
February 27, 2025 - Python offers two main approaches for reversing a list. We will cover different methods more comprehensively below, but for now, I want to make this distinction clear. This method directly modifies the original list without creating a new one. The reverse() method performs this operation, which is efficient for memory as it doesn't need additional storage. However, this method alters the original data. #Original list numbers = [1, 2, 3, 4, 5] #Reverse the list in place numbers.reverse() print(numbers) #Output: [5, 4, 3, 2, 1]
๐ŸŒ
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 ...
๐ŸŒ
datagy
datagy.io โ€บ home โ€บ python posts โ€บ how to reverse a python list (6 ways)
How to Reverse a Python List (6 Ways) โ€ข datagy
February 15, 2023 - The best way to reverse a list using slicing in Python is to use negative indexing. This allows you to step over a list using -1, by using the code list[::-1].
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ reversing a list in python?
r/learnprogramming on Reddit: Reversing a list in Python?
February 11, 2022 -

Hey, I'm learning lists in Python. When I try to use the reverse method to reverse my list it returns 'None'. I've read online that apparently this is because it doesn't actually change the list but I'm not sure what that means tbh. Even if it was a temporary modification, wouldn't it print that temporarily modified version of the list instead of printing 'None'? I found another solution (assuming the list is stored in my_list variable), print(my_list[::-1]). I understand that the -1 is referring to the end of the list (and maybe telling it to count back from there), but I have no idea what the '::' means. Would appreciate some help, thanks.

๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ list_reverse.htm
Python List reverse() Method
The Python List reverse() method reverses a list. That means, the first object in the list becomes the last object and vice versa. Another common technique used to reverse a string is done using the slicing operator with the syntax [::-1]. However, ...
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-reverse-list-reversing-an-array-in-python
Python Reverse List โ€“ Reversing an Array in Python
September 6, 2022 - # original list my_numbers = [1,2,3,4,5] # reversing original list my_numbers_reversed = my_numbers[::-1] # print original list print(my_numbers) # print new list with the items from the original list in reverse order print(my_numbers_reversed) # output # [1, 2, 3, 4, 5] # [5, 4, 3, 2, 1] The slicing operator does not modify the original list. Rather it returns a new list, which is a copy of the items from the original list in reverse order. And there you have it! You now know how to reverse any list in Python.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_reverse_a_list.htm
Python Reverse a List
The reverse() method in list class reverses the order of items in the list. The item in last index is relocated to 0th index, and one originally at index 0 goes to the last position.
Top answer
1 of 3
243
newlist = oldlist[::-1]

The [::-1] slicing (which my wife Anna likes to call "the Martian smiley";-) means: slice the whole sequence, with a step of -1, i.e., in reverse. It works for all sequences.

Note that this (and the alternatives you mentioned) is equivalent to a "shallow copy", i.e.: if the items are mutable and you call mutators on them, the mutations in the items held in the original list are also in the items in the reversed list, and vice versa. If you need to avoid that, a copy.deepcopy (while always a potentially costly operation), followed in this case by a .reverse, is the only good option.

2 of 3
68

Now let's timeit. Hint: Alex's [::-1] is fastest :)

$ p -m timeit "ol = [1, 2, 3]; nl = list(reversed(ol))"
100000 loops, best of 3: 2.34 usec per loop

$ p -m timeit "ol = [1, 2, 3]; nl = list(ol); nl.reverse();"
1000000 loops, best of 3: 0.686 usec per loop

$ p -m timeit "ol = [1, 2, 3]; nl = ol[::-1];"
1000000 loops, best of 3: 0.569 usec per loop

$ p -m timeit "ol = [1, 2, 3]; nl = [i for i in reversed(ol)];"
1000000 loops, best of 3: 1.48 usec per loop


$ p -m timeit "ol = [1, 2, 3]*1000; nl = list(reversed(ol))"
10000 loops, best of 3: 44.7 usec per loop

$ p -m timeit "ol = [1, 2, 3]*1000; nl = list(ol); nl.reverse();"
10000 loops, best of 3: 27.2 usec per loop

$ p -m timeit "ol = [1, 2, 3]*1000; nl = ol[::-1];"
10000 loops, best of 3: 24.3 usec per loop

$ p -m timeit "ol = [1, 2, 3]*1000; nl = [i for i in reversed(ol)];"
10000 loops, best of 3: 155 usec per loop

Update: Added list comp method suggested by inspectorG4dget. I'll let the results speak for themselves.