Use the built-in reversed() function:

>>> a = ["foo", "bar", "baz"]
>>> for i in reversed(a):
...     print(i)
... 
baz
bar
foo

To also access the original index, use enumerate() on your list before passing it to reversed():

>>> for i, e in reversed(list(enumerate(a))):
...     print(i, e)
... 
2 baz
1 bar
0 foo

Since enumerate() returns a generator and generators can't be reversed, you need to convert it to a list first.

Answer from Greg Hewgill on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › backward-iteration-in-python
Backward iteration in Python - GeeksforGeeks
July 11, 2025 - We can use slicing slicing notation [::-1] to reverse the order of elements in an iterable. This works for lists, tuples, and strings, but not for sets or dictionaries (since they are unordered).
Discussions

iteration - How to loop backwards in python? - Stack Overflow
But in Python 3 (which I happen to use) range() returns an iterator and xrange doesn't exist. ... a little too late to answer but, I didn't see the easiest solution here so here it is..........................................................for i in range(n)[::-1] this will give you i in reverse order... More on stackoverflow.com
🌐 stackoverflow.com
Why isn't my loop iterating backwards in python?
Hint: Look up documentation on the ‘range’ function…does it actually do what you think it does given the two arguments you provided? Maybe you’re missing an argument? https://docs.python.org/3/library/stdtypes.html#range More on reddit.com
🌐 r/learnprogramming
13
0
March 8, 2023
Differences in iteration through a loop in reverse order - Python
You can look up the Official Documentation on range() , to see what it does. The ::-1 notation is Slice Notation , while reversed() just returns an iterator. More on reddit.com
🌐 r/learnprogramming
5
1
August 5, 2021
iterate over a string in reverse
https://docs.python.org/3/library/functions.html#reversed More on reddit.com
🌐 r/learnpython
7
1
February 7, 2023
🌐
Python Morsels
pythonmorsels.com › looping-in-reverse
Looping in reverse - Python Morsels
May 27, 2025 - To loop in the reverse direction, you can use Python's built-in reversed function: >>> colors = ["purple", "blue", "green", "pink", "red"] >>> for color in reversed(colors): ... print("I like", color) ...
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python for loop in backwards
Python For Loop in Backwards - Spark By {Examples}
May 31, 2024 - # Get the index and items of list in backward direction. list1=[10, 20, 50, 30, 40, 80, 60] print("Get the loop in backwards") for i, item in reversed(list(enumerate(list1))): print(i, item) # Output: # Get the loop in backwards # 6 60 # 5 80 # 4 40 # 3 30 # 2 50 # 1 20 # 0 10 · In this article, I will explain using reversed() and range() functions of Python how we can implement the loop from the backward direction with examples.
🌐
Real Python
realpython.com › python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() – Real Python
June 28, 2023 - For example, the first iteration removes 9 from the right end of the list and stores it in last_item. Then it inserts 9 at index 0. The next iteration takes 8 and moves it to index 1, and so on. At the end of the loop, you get the list reversed in place. ... If you want to create a reversed copy of an existing list in Python, then you can use reversed(). With a list as an argument, reversed() returns an iterator that yields items in reverse order:
Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › differences in iteration through a loop in reverse order - python
r/learnprogramming on Reddit: Differences in iteration through a loop in reverse order - Python
August 5, 2021 -

So I'm building a game that requires me to loop through a list in reverse order.

It seems that there are multiple ways to do this same task, but I want to make sure I understand the differences between the alternative ways.

From what I have found online:

I can use list comprehension -

for _ in desired_list[::-1]

I can use reversed() -

for _ in revered(desired_list)

I can use a range() -

for _ in range(len(desired_list) -1, 0, -1)

Is there any functional difference between these?

Also for the range iteration, could you verify what each number stands for?

It seems to be:

range("number to start on", "number to end up", "direction and distance to travel in list")

Is that correct?

Thank you for any help!

🌐
Codecademy
codecademy.com › article › how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
The for loop iterates through the list in reverse order using a decrementing index, appending each element to a new list.
🌐
TutorialsPoint
tutorialspoint.com › backward-iteration-in-python
Backward iteration in Python
August 7, 2019 - We use a for loop with an iterator ... result − · Thu Wed Tue Mon · The reversed() function is very straight forward it's simply picks the elements and prints them in the reverse order....
🌐
Towards Data Science
towardsdatascience.com › home › latest › how to reverse python lists more efficiently
How To Reverse Python Lists More Efficiently | Towards Data Science
January 20, 2025 - As you can see, the reversed() function returned an Iterator we can loop over it: >>> for element in my_lst_reverse_iter: ... print(element) ...
🌐
Mimo
mimo.org › glossary › python › for-loop
Python For Loop: Syntax and Examples [Python Tutorial]
You can loop over a sequence in reverse order by using the reversed() Python function.
🌐
Stack Abuse
stackabuse.com › bytes › traversing-a-list-in-reverse-order-in-python
Traversing a List in Reverse Order in Python
August 30, 2023 - Whatever the reason, luckily there are a few ways to accomplish this in Python. Python has a built-in function called reversed() that returns a reverse iterator. An iterator is an object that contains a countable number of values and can be iterated (looped) upon.
🌐
Medium
medium.com › becoming-a-better-software-developer › undetstanding-python-iterators-reversed-iteration-35f1c1d16196
Undetstanding Python Iterators: Reversed Iteration | by Saleem Latif | Becoming a better Software Developer | Medium
March 8, 2023 - In Python, you can reverse iterate over a sequence by using the reversed() function. The reversed() function returns an iterator that produces the elements of a sequence in reverse order.
🌐
LearnPython.com
learnpython.com › blog › reverse-range-in-python
How to Reverse a Range in Python | LearnPython.com
September 7, 2022 - In the example below, we jump downwards ... # 80 # ... As a bonus, here’s another way to reverse a range: use the sorted() function with the parameter reverse=True....
🌐
Codecademy Forums
discuss.codecademy.com › frequently asked questions › python faq
Can a for loop iterate over a list backwards? - Python FAQ - Codecademy Forums
August 3, 2018 - Question Is it possible to have a for loop iterate over a list in reverse order without changing the list? Answer Yes, you can iterate over a list in reverse order without changing the list using the reversed() function.
🌐
Quora
quora.com › How-do-I-write-a-program-in-Python-using-a-for-loop-by-the-reverse-indexing-method
How to write a program in Python using a for loop by the reverse indexing method - Quora
Answer (1 of 2): Upon doing a quick search, the reverse indexing method involves iterating through a group of stored values or string in reverse order. In other words, we begin from the end of the list or string until we reach its first value.
🌐
Medium
geekpython.medium.com › 8-ways-to-reverse-the-elements-in-a-python-list-ad50889bdd7e
8 Ways To Reverse The Elements In A Python List | by Sachin Pal | Medium
November 25, 2022 - Python reversed() function is also used to reverse the elements inside the list. Still, instead of returning the reversed object, it returns the reversed iterator object that accesses the values of a given sequence.
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-reverse-string
Python Reverse String - 5 Ways and the Best One | DigitalOcean
August 3, 2022 - Python String doesn’t have a built-in reverse() function. However, there are various ways to reverse a string in Python. ... Using Slicing to create a reverse copy of the string. Using for loop and appending characters in reverse order