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 - s = "Python" # - len(s) - 1: Start ... i in range(len(s) - 1, -1, -1): print(s[i]) Output ยท n o h t y P ยท We can use slicing slicing notation [::-1] to reverse the order of elements in an iterable....
๐ŸŒ
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....
๐ŸŒ
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 ... function. Pass range() function into reversed() function will reverse the range() function without any modification and then iterate reversed() function using for loop....
๐ŸŒ
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().
Find elsewhere
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ looping-in-reverse
Looping in reverse - Python Morsels
May 27, 2025 - If you're working with a list, a string, or any other sequence in Python, you can reverse that sequence using Python's slicing syntax: >>> colors = ["purple", "blue", "green", "pink", "red"] >>> colors[::-1] ['red', 'pink', 'green', 'blue', 'purple'] The syntax looks weird, but it does work. If we wanted to write a for loop that iterated over our list from the end to the beginning, we could loop over the reversed slice of that list:
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ python โ€บ reverse a range in python with examples
Reverse a Range in Python with Examples - Spark By {Examples}
May 31, 2024 - In this article, you have learned how to reverse the range in Python by using the built-in functions reversed() and sorted(). Besides these, you can also print the range in reverse order by using for loop.
๐ŸŒ
GoLinuxCloud
golinuxcloud.com โ€บ home โ€บ python โ€บ how to print range() in reverse order in python
How to print range() in reverse order in Python | GoLinuxCloud
December 29, 2023 - # Python range reverse with three arguments in reverse order myRange = range(20, 0, -1) # printing print("The Range in reverse order is :") # for loop to iterate for num in myRange: # condition if (num%4==0): print(num) ...
๐ŸŒ
Flexiple
flexiple.com โ€บ python โ€บ python-range-reverse
How to reverse a range in Python? | Flexiple Tutorials | Python - Flexiple
March 14, 2022 - Increment - Optional, used to specify the incrementation. #if only one argument is passed, Python assumes that it is a stop value. for i in range(5): print(i) ... It is common to reverse a list of values in the range.
๐ŸŒ
Delft Stack
delftstack.com โ€บ home โ€บ howto โ€บ python โ€บ python backward range
How to Get Range Backwards in Python | Delft Stack
March 4, 2025 - This tutorial demonstrates how to iterate backwards using the range method in Python. Learn various techniques including using the range function with a negative step, the reversed function, and list slicing. Each method is explained with clear code examples, making it easy to understand how to effectively traverse iterables in reverse order.
๐ŸŒ
PYnative
pynative.com โ€บ home โ€บ python โ€บ python range() explained with examples
Python range() Function Explained with Examples
March 17, 2022 - Letโ€™s see how to loop in a reverse iteration or backward iteration to display a range of numbers from 5 to 0. # reverse range using negative step # start = 5 # stop = -1 # step = -1 for i in range(5, -1, -1): print(i)Code language: Python (python) Run
๐ŸŒ
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?
๐ŸŒ
Enterprise DNA
blog.enterprisedna.co โ€บ how-to-reverse-a-range-in-python
5 Way How to Reverse a Range in Python: A Step-By-Step Guide โ€“ Master Data Skills + AI
For example, you can iterate over ... summary, to reverse a range in Python, you need to convert it to a list, use the reversed() function on the list, and then convert the resulting reverse iterator back to a list if needed....
๐ŸŒ
Freak Learn
freaklearn.com โ€บ home โ€บ how can you use a for loop in reverse in python?
How Can You Use a For Loop in Reverse in Python?
May 11, 2025 - To loop in reverse, you can set the `start` parameter to a higher value than `end`, and use a negative `step`. For example, to iterate from 10 down to 1, you can use: โ€œ`python for i in range(10, 0, -1): print(i) โ€œ`
๐ŸŒ
Kodeclik
kodeclik.com โ€บ python-range-in-reverse
How to Reverse a Range in Python
September 19, 2024 - There are three ways to reverse a range in Python. 1. Use a negative step size to construct the range. 2. Use the reversed() function. 3. Construct the range the normal way and then use slicing.
๐ŸŒ
PyTutorial
pytutorial.com โ€บ python-range-backwards-reverse-number-sequences
PyTutorial | Python Range Backwards: Reverse Number Sequences
4 days ago - Learn more about this behavior in our article Is Python Range Inclusive? Stop Value Explained. Let's start with a simple countdown from 5 to 1. We set start=5, stop=0, and step=-1. The sequence will be 5, 4, 3, 2, 1. # Countdown from 5 to 1 for i in range(5, 0, -1): print(i) ... Notice that 0 is not printed. The loop stops before reaching the stop value. This is a fundamental aspect of range(). A common use case is to traverse a list in reverse order.
๐ŸŒ
DEV Community
dev.to โ€บ lavary โ€บ how-to-reverse-a-range-in-python-with-examples-664
How to reverse a range in Python (with examples) - DEV Community
February 4, 2023 - The reversed() function takes a ... reversed-iterator object. You can use reversed() function in conjunction with the range() function in for loops to iterate over a sequence in reverse order:...