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
๐ŸŒ
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
๐ŸŒ
AskPython
askpython.com โ€บ home โ€บ reverse an array in python โ€“ 10 examples
Reverse an Array in Python - 10 Examples - AskPython
January 16, 2024 - In this tutorial, we'll go over the different methods to reverse an array in Python. The Python language does not come with array data structure support.
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ stdtypes.html
Built-in Types โ€” Python 3.14.3 documentation
1 month ago - Forward and reversed iterators over mutable sequences access values using an index. That index will continue to march forward (or backward) even if the underlying sequence is mutated.
๐ŸŒ
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....
๐ŸŒ
Quora
quora.com โ€บ How-do-I-reverse-an-array-in-Python
How to reverse an array in Python - Quora
Answer (1 of 3): Reverse an array in python Reverse an array in Python is simple. in python there is various method to reverse an array that is slicing method, using a reverse method, using the reversed method, etc. 1. Using Slicing method in python 3 : arr = [1,2,3,4,5,6,7,8,9,0] print(โ€œthe o...
๐ŸŒ
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.
Find elsewhere
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-reverse-a-numpy-array
Reverse a Numpy Array - Python - GeeksforGeeks
September 20, 2025 - The numpy.flip() function reverses the order of array elements along the specified axis.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ how to reverse a python list (3 methods)
r/Python on Reddit: How to reverse a Python list (3 methods)
February 19, 2022 -

There are three methods you can use to reverse a list:

  1. An in-place reverse, using the built-in reverse method that every list has natively

  2. Using list slicing with a negative step size, resulting in a new list

  3. Create a reverse iterator, with the reversed() function

You can try this for yourself too. Click here to open a runnable/editable example.

๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ reverse-a-list-in-python-without-using-reverse-function
Reverse a List in Python Without Using reverse() Function - GeeksforGeeks
July 23, 2025 - List comprehension is a more compact way to reverse a list by iterating over the original list in reverse order and constructing a new list.
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
Reverse a List, String, Tuple in Python: reverse, reversed | note.nkmk.me
August 16, 2023 - t_reversed = t[::-1] print(t_reversed) # (5, 4, 3, 2, 1) ... List vs. Array vs. numpy.ndarray in Python
๐ŸŒ
Medium
medium.com โ€บ @ryan_forrester_ โ€บ python-array-reverse-complete-guide-37f508724621
Python Array Reverse: Complete Guide | by ryan | Medium
October 28, 2024 - Letโ€™s explore the different ways to reverse lists in Python, with practical examples you can use in your own code. The `reverse()` method is Pythonโ€™s built-in solution for flipping lists.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_reverse_arrays.htm
Python - Reverse Arrays
We can also reverse the sequence of numbers in an array using the reverse() method of list class. Here, list is a built-in type in Python.
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ Array โ€บ reverse
Array.prototype.reverse() - JavaScript | MDN
In other words, elements order in the array will be turned towards the direction opposite to that previously stated. To reverse the elements in an array without mutating the original array, use toReversed().
๐ŸŒ
iO Flood
ioflood.com โ€บ blog โ€บ python-reverse-list
Python Reverse List: Complete Guide (With Examples)
June 17, 2024 - In this example, we import the NumPy library and use its flip() function to reverse my_list. The tolist() function then converts the NumPy array back to a Python list.
Top answer
1 of 8
342
reversed_arr = arr[::-1]

gives a reversed view into the original array arr. Any changes made to the original array arr will also be immediately visible in reversed_arr. The underlying data buffers for arr and reversed_arr are shared, so creating this view is always instantaneous, and does not require any additional memory allocation or copying for the array contents.

See also, this discussion on NumPy views: How do I create a view onto a NumPy array?


Possible solutions to performance problems regarding views

Are you re-creating the view more often than you need to? You should be able to do something like this:

arr = np.array(some_sequence)
reversed_arr = arr[::-1]

do_something(arr)
look_at(reversed_arr)
do_something_else(arr)
look_at(reversed_arr)

I'm not a numpy expert, but this seems like it would be the fastest way to do things in numpy. If this is what you are already doing, I don't think you can improve on it.

2 of 8
95
a[::-1]

only creates a view, so it's a constant-time operation (and as such doesn't take longer as the array grows). If you need the array to be contiguous (for example because you're performing many vector operations with it), ascontiguousarray is about as fast as flipud/fliplr:


Code to generate the plot:

import numpy
import perfplot


perfplot.show(
    setup=lambda n: numpy.random.randint(0, 1000, n),
    kernels=[
        lambda a: a[::-1],
        lambda a: numpy.ascontiguousarray(a[::-1]),
        lambda a: numpy.fliplr([a])[0],
    ],
    labels=["a[::-1]", "ascontiguousarray(a[::-1])", "fliplr"],
    n_range=[2 ** k for k in range(25)],
    xlabel="len(a)",
)
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-sort-lists-and-reverse-arrays
Python Sorted List โ€“ And How to Sort or Reverse an Array in Python
February 24, 2023 - We discussed three popular approaches for sorting lists in Python โ€“ using the built-in sort() method and sorted() function and the heapq module. Additionally, we explored how to reverse an array using both the built-in reverse() function and ...
๐ŸŒ
Data Science Dojo
discuss.datasciencedojo.com โ€บ python
How to reverse an array? - Python - Data Science Dojo Discussions
February 16, 2023 - Hey everyone. I need your help. This is my vector [1,2,3,4,5] . I want to invert in a way that the last value comes first and so on. I used the list function but that is on applicable to Pythonโ€™s built-in List and not wโ€ฆ
๐ŸŒ
VisuAlgo
visualgo.net โ€บ en โ€บ array
Array - VisuAlgo
(Compact) Array is among the easiest and the most versatile data structure in Computer Science. Array is built-in almost all programming languages, e.g., C++, Python ('array' is called as 'list' in Python), Java, etc.