To get a new reversed list, apply the reversed function and collect the items into a list:
>>> xs = [0, 10, 20, 40]
>>> list(reversed(xs))
[40, 20, 10, 0]
To iterate backwards through a list:
>>> xs = [0, 10, 20, 40]
>>> for x in reversed(xs):
... print(x)
40
20
10
0
Answer from codaddict on Stack Overflow Top answer 1 of 16
1734
To get a new reversed list, apply the reversed function and collect the items into a list:
>>> xs = [0, 10, 20, 40]
>>> list(reversed(xs))
[40, 20, 10, 0]
To iterate backwards through a list:
>>> xs = [0, 10, 20, 40]
>>> for x in reversed(xs):
... print(x)
40
20
10
0
2 of 16
1542
>>> xs = [0, 10, 20, 40]
>>> xs[::-1]
[40, 20, 10, 0]
Extended slice syntax is explained here. See also, documentation.
W3Schools
w3schools.com › python › ref_list_reverse.asp
Python List reverse() Method
Python Examples Python Compiler ... Q&A Python Bootcamp Python Certificate Python Training ... The reverse() method reverses the sorting order of the elements....
Can I reverse a list in Python without using the reverse() function?
Yes! You can use slicing like my_list[::-1], which creates a reversed copy of the list. You can also use loops, reversed(), or the pop() method to achieve the same result.
wscubetech.com
wscubetech.com › resources › python › programs › list-reverse
Reverse a List in Python (6 Programs)
How do I reverse a list in Python using a for loop?
You can go through the list from the end and add each item to the start of a new list.
wscubetech.com
wscubetech.com › resources › python › programs › list-reverse
Reverse a List in Python (6 Programs)
How can I reverse a list in Python using the easiest method?
The easiest way to reverse a list in Python is by using the .reverse() method. It modifies the list in place without creating a new one. Just use my_list.reverse() and your list will be reversed instantly.
wscubetech.com
wscubetech.com › resources › python › programs › list-reverse
Reverse a List in Python (6 Programs)
Videos
04:52
How to reverse a list/array with and without using built in method ...
02:44
20 Ways You Can Reverse List in Python - YouTube
00:52
How to Reverse the order of a List in Python | reverse() method ...
05:16
How To Reverse A List In Python - YouTube
02:25
13. How to reverse a list | python coding - 3 - YouTube
Reverse A List Without Using reverse() | Python Example
GeeksforGeeks
geeksforgeeks.org › python › python-reversing-list
Reversing a List in Python - GeeksforGeeks
This method builds a reversed version of the list using slicing with a negative step. ... Python's built-in reversed() function is another way to reverse the list.
Published November 26, 2025
Programiz
programiz.com › python-programming › methods › list › reverse
Python List reverse()
Become a certified Python programmer. Try Programiz PRO! ... The reverse() method reverses the elements of the list.
WsCube Tech
wscubetech.com › resources › python › programs › list-reverse
Reverse a List in Python (6 Programs)
October 30, 2025 - Learn 6 different Python programs to reverse a list with easy examples, outputs, and explanations. Read now!
Mathspp
mathspp.com › blog › twitter-threads › 3-ways-to-reverse-a-python-list
3 ways to reverse a Python list | mathspp
August 25, 2022 - >>> lst = [42, 73, 0] >>> rev = reversed(lst) >>> lst[1] = 999999 # Change something in the original list. >>> for n in rev: # Go over the reverse iterator. ... print(n) ... 0 999999 # This was changed as well. 42 · The slicing syntax with brackets [] and colons : accepts a “step” that can be negative. If the “start” and “stop” are omitted and the “step” is -1, we get a copy in the reverse order: ... Slices in Python 🐍 are regular objects, so you can also name them.
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.
NeetCode
neetcode.io › problems › reverse-nodes-in-k-group › question
Reverse Nodes in K-Group - NeetCode
After reversing the current group, we reconnect it by linking the previous group's tail to the new head and the current group's tail to the next group's head. This process is repeated for all groups, and we return the new head of the linked list. ... Please upgrade to NeetCode Pro to view company tags. ... Python ...
Vultr Docs
docs.vultr.com › python › standard-library › list › reverse
Python List Reverse() - Reverse List Order | Vultr Docs
November 7, 2024 - It modifies the list in place, meaning it doesn't create a new list but instead changes the original list directly, which can be beneficial for memory management, especially with large lists. In this article, you will learn how to adeptly utilize the reverse() method to invert the order of lists.
Reddit
reddit.com › r/learnpython › why does [::-1] reverse a list?
r/learnpython on Reddit: Why does [::-1] reverse a list?
March 12, 2022 -
Why would a double colon reverse a list? Is this something we just have to accept or is there some logic?
a = ['corge', 'quux', 'qux', 'baz', 'bar', 'foo'] print(a[::-1])
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.3 documentation
Return a shallow copy of the list. Similar to a[:]. ... >>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] >>> fruits.count('apple') 2 >>> fruits.count('tangerine') 0 >>> fruits.index('banana') 3 >>> fruits.index('banana', 4) # Find next banana starting at position 4 6 >>> fruits.reverse() >>> fruits ['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange'] >>> fruits.append('grape') >>> fruits ['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange', 'grape'] >>> fruits.sort() >>> fruits ['apple', 'apple', 'banana', 'banana', 'grape', 'kiwi', 'orange', 'pear'] >>> fruits.pop() 'pear'
NareshIT
nareshit.com › blogs › how-to-reverse-a-list-in-python-learn-python-list-reverse-method
How to Reverse a List in Python | Learn Python List Reverse() Method
In general, the reversing a List In-Place With the list. reverse() Method. Every list in Python has a built-in reverse() method which is allowed to call to reverse the contents of the list object in-place.
W3Schools
w3schools.com › python › ref_func_reversed.asp
Python reversed() Function
Python Overview Python Built-in ... File Methods Python Keywords Python Exceptions Python Glossary · Built-in Modules Random Module Requests Module Statistics Module Math Module cMath Module · Remove List Duplicates Reverse a String Add Two Numbers...
DataCamp
datacamp.com › tutorial › python-reverse-list
Python Reverse List: How to Reorder Your Data | DataCamp
February 27, 2025 - If you're starting your Python ... concepts like list handling and data structures. The easiest way to reverse a list in Python is using slicing ([::-1]), which creates a new reversed list without modifying the original:...
LinkedIn
linkedin.com › pulse › how-reverse-list-python-learn-method-nareshit-
How to Reverse a List in Python: Learn Python List Reverse () Method - NareshIT
December 6, 2022 - As we have already discussed earlier in the above segment Every list in Python has a built-in reverse() method, so if it is needed then we can call this method to reverse the contents of the list object in place. Reversing a list in place means it won’t create and copy the existing elements to a new list.
Medium
cagll.medium.com › reverse-a-list-not-in-place-in-python-b76311604fae
Reverse a list not in place in Python | by cagil | Medium
October 13, 2017 - In [1]: lon = [1,2,3,4,5] In [2]: lon.reverse() In [3]: lon Out[3]: [5, 4, 3, 2, 1]In [4]: lon[::-1] Out[4]: [5, 4, 3, 2, 1] It is called a slice step and can be explained basicly as list[start:end:step]. Check out some examples below and have fun using it! In [11]: another_lon = list(range(1,10))In [12]: another_lon[0::1] Out[12]: [1, 2, 3, 4, 5, 6, 7, 8, 9]In [13]: another_lon[0:9:1] Out[13]: [1, 2, 3, 4, 5, 6, 7, 8, 9]In [19]: another_lon[1::1] Out[19]: [2, 3, 4, 5, 6, 7, 8, 9]In [20]: another_lon[2::1] Out[20]: [3, 4, 5, 6, 7, 8, 9]In [25]: another_lon[2:8:1] Out[25]: [3, 4, 5, 6, 7, 8]In