range() and xrange() take a third parameter that specifies a step. So you can do the following.

range(10, 0, -1)

Which gives

[10, 9, 8, 7, 6, 5, 4, 3, 2, 1] 

But for iteration, you should really be using xrange instead. So,

xrange(10, 0, -1)

Note for Python 3 users: There are no separate range and xrange functions in Python 3, there is just range, which follows the design of Python 2's xrange.

Answer from Chinmay Kanchi on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › backward-iteration-in-python
Backward iteration in Python - GeeksforGeeks
July 11, 2025 - a = [1, 2, 3, 4, 5] #Loop through the List # reverse order using slicing(::-1) for item in a[::-1]: print(item) # same logic written using List comprehension # [print(item) for item in a[::-1]] ... Using a while loop provides you control over the iteration process. This is need to manually control the index and decrement the index during each iteration to traverse the it backward.
Discussions

python - Loop backwards using indices - Stack Overflow
Using a reversed generator would take milliseconds and only use up a few bytes of memory. 2019-09-29T06:23:02.01Z+00:00 ... the third parameter (step) is by default +1. So you have to specify 3rd parameter to range() as -1 to step backwards. ... NOTE: This includes 100 & 0 in the output. There are multiple ways. ... For pythonic ... 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
How to Loop Backwards in Python? - TestMu AI Community
How can I loop backwards from 100 to 0 in Python using a backwards range python? I tried using for i in range(100, 0), but it doesn’t work as expected. How can I fix this to achieve a backward loop? More on community.testmu.ai
🌐 community.testmu.ai
0
December 8, 2024
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 - Usually loop iterations start from front side if you want to get the loop iterations from back side rather than the front side you can use reversed() function. Pass range() function into reversed() function will reverse the range() function ...
🌐
TutorialsPoint
tutorialspoint.com › article › backward-iteration-in-python
Backward iteration in Python
1 week ago - Python provides three common approaches: range() with negative step, slice notation [::-1], and the reversed() built-in function. Start from the last index and step backwards by -1 until index 0 ? days = ['Mon', 'Tue', 'Wed', 'Thu'] for i in ...
Find elsewhere
🌐
TestMu AI Community
community.testmu.ai › ask a question
How to Loop Backwards in Python? - TestMu AI Community
December 8, 2024 - How can I loop backwards from 100 to 0 in Python using a backwards range python? I tried using for i in range(100, 0), but it doesn’t work as expected. How can I fix this to achieve a backward loop?
🌐
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.
🌐
JanBask Training
janbasktraining.com › community › python-python › how-do-i-reverse-a-list-or-loop-over-it-backwards
How do I reverse a list or loop over it backwards? | JanBask Training Community
June 4, 2025 - Python offers built-in features that make this process clean and readable. ... The reversed() function returns an iterator that yields the elements of the list in reverse order. my_list = [1, 2, 3, 4, 5] for item in reversed(my_list): print(item)
🌐
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 - These iterators are: ... The reversed() function on strings returns an iterator that produces the elements of the string in reverse order. >>> for char in reversed("hello"): ... print(char, end="") ... olleh ...
🌐
Replit
replit.com › home › discover › how to iterate backwards in python
How to iterate backwards in Python | Replit
3 weeks ago - The reversed() function doesn't create a new, backward list. Instead, it returns an iterator that yields items from the original log_entries list, beginning with the last 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.
🌐
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 - >>> my_lst = [10, 0, 30, 25, 40, 100, 80] >>> my_lst_reverse_iter = reversed(my_lst) >>> my_lst_reverse_iter <list_reverseiterator object at 0x10afcae20> As you can see, the reversed() function returned an Iterator we can loop over it: >>> for ...
🌐
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 until they meet. ... left = 0 right = len(list_name) - 1 while left < right: Swap list_name[left] and list_name[right] Move left pointer forward Move right pointer backward
🌐
Real Python
realpython.com › python-range
Python range(): Represent Numerical Ranges – Real Python
November 24, 2024 - The range parameters start, stop, and step define where the sequence begins, ends, and the interval between numbers. Ranges can go backward in Python by using a negative step value and reversed by using reversed().
🌐
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.
🌐
TestMu AI Community
community.testmuai.com › ask a question
How do I use reverse list in Python to loop through a list backwards? - Ask a Question - TestMu AI Community
July 2, 2025 - I want to iterate over a list in reverse order using Python. What’s the most efficient or Pythonic way to handle a python reverse list scenario, especially when looping? Are there any differences between using reversed…