Use reversed() function (efficient since range implements __reversed__):

reversed(range(10))

It's much more meaningful.

Update: list cast

If you want it to be a list (as @btk pointed out):

list(reversed(range(10)))

Update: range-only solution

If you want to use only range to achieve the same result, you can use all its parameters. range(start, stop, step)

For example, to generate a list [3, 2, 1, 0], you can use the following:

range(3, -1, -1)

It may be less intuitive, but it works the same with less text. This answer by @Wolf indicates this approach is slightly faster than reversed.

Answer from Michał Šrajer on Stack Overflow
🌐
LearnPython.com
learnpython.com › blog › reverse-range-in-python
How to Reverse a Range in Python | LearnPython.com
September 7, 2022 - Learn how to reverse a range in Python using the range(), reversed(), and sorted() functions.
Discussions

Reversing a range using a FOR LOOP
You should show what you've tried so far. It's easier to give productive help if we base the help on code you've written. It doesn't require a for-loop though. You can use one, but it would be far more straightforward with a while. Be careful of artificially limiting what tools you consider. More on reddit.com
🌐 r/learnpython
11
0
December 24, 2022
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
Is there a way to reverse a for loop
The reversed() function might be what you're looking for. Return a reverse iterator. seq must be an object which has a __reversed__() method or supports the sequence protocol (the __len__() method and the __getitem__() method with integer arguments starting at 0). ie for i in reversed(range(1, 101)): print(i) output: 100 99 98 97 96 ... 5 4 3 2 1 More on reddit.com
🌐 r/learnpython
4
1
March 27, 2020
People also ask

Can I combine reverse range with other Python functions or libraries?
Absolutely! Python reverse range can be seamlessly integrated with other Python functions and libraries. For example, you can combine reverse range with list comprehensions or apply it within NumPy functions to perform complex calculations on reverse sequences.
🌐
docs.kanaries.net
docs.kanaries.net › topics › Python › python-reverse-range
How to Use Python Reverse Range: Easy Guide – Kanaries
Can I use reverse range with non-numeric values, such as strings or objects?
No, reverse range is specifically designed for numerical sequences. It operates on numbers and doesn't provide a direct way to reverse non-numeric values. However, you can still use other techniques, like indexing or slicing, to achieve reverse iteration with non-numeric sequences.
🌐
docs.kanaries.net
docs.kanaries.net › topics › Python › python-reverse-range
How to Use Python Reverse Range: Easy Guide – Kanaries
Are there any performance considerations when using reverse range?
Reverse range doesn't have any significant performance differences compared to the regular range. Both functions have similar time complexities, and the choice between them depends on the specific requirements of your program. However, it's important to be mindful of the step size, especially when working with large ranges, to avoid unintended results or excessive memory usage.
🌐
docs.kanaries.net
docs.kanaries.net › topics › Python › python-reverse-range
How to Use Python Reverse Range: Easy Guide – Kanaries
🌐
Real Python
realpython.com › python-range
Python range(): Represent Numerical Ranges – Real Python
November 24, 2024 - Calling reversed() creates a range_iterator object that you can use in your loops. Listing the elements shows that the range has been reversed, with the odd numbers now appearing in descending order.
🌐
Kanaries
docs.kanaries.net › topics › Python › python-reverse-range
How to Use Python Reverse Range: Easy Guide – Kanaries
June 6, 2023 - Python's range() function allows you to generate a sequence of numbers, starting from a specified value, ending before another specified value, and incrementing by a specified step. Reverse range can be achieved by setting the start value greater than the stop value and using a negative step. The ...
🌐
Flexiple
flexiple.com › python › python-range-reverse
How to reverse a range in Python? | Flexiple Tutorials | Python - Flexiple
#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.
🌐
GeeksforGeeks
geeksforgeeks.org › python › backward-iteration-in-python
Backward iteration in Python - GeeksforGeeks
July 11, 2025 - a = [10, 20, 30, 40, 50] #Loop through the list #using reversed() to reverse the order of list for b in reversed(a): print(b) ... Let's explore more methods that helps to iterate backward on any iterable. Here are some common approaches: ... range function is provided with three arguments(N, -1, -1). Use this method when we need to modify elements or access their indices. ... s = "Python" # - len(s) - 1: Start at the last index # - -1: Ensures the loop stops after the first character # - -1: The step value to iterate backwards for i in range(len(s) - 1, -1, -1): print(s[i])
Find elsewhere
🌐
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 - # Create range of numbers myrange = range(0,5) print("Actual Range: ", myrange) # Get range in reversed order for x in range(5,0,-1): print(x) Yields below output. In this article, you have learned how to reverse the range in Python by using the built-in functions reversed() and sorted().
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-program-to-reverse-a-range-in-list
Python program to reverse a range in list - GeeksforGeeks
July 23, 2025 - Use range(end, start - 1, -1) to iterate from the end index to start in reverse order.
🌐
freeCodeCamp
freecodecamp.org › news › python-reverse-list-how-to-reverse-a-range-or-array
Python Reverse List – How to Reverse a Range or Array
November 22, 2021 - You see that the initial order of the list has now changed and the elements inside it have been reversed. The slicing operator works similarly to the range() function you saw earlier on. It also accepts the start, stop, step arguments. The syntax looks like this: start:end:step. ... In the example above, we wanted to fetch the items starting from index 1 up to, but not including, the item with index 3, incrementing one number at a time. Indexing in Python starts from 0, so the first element has an index of 0, the second element has an index of 1, and so on.
🌐
Replit
replit.com › home › discover › how to reverse a range in python
How to reverse a range in Python | Replit
March 3, 2026 - The range(10, 0, -1) creates a sequence counting down from 10 to 1. When you pass this to reversed(), it flips the order again, resulting in an ascending sequence.
🌐
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
This loop will print the elements ... 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....
🌐
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 - You can see in the above output that the range of numbers is starting from 2 as specified and the step size is 3. The Python reversed() function allows us to process the items in a sequence in reverse order.
🌐
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.
🌐
Mimo
mimo.org › glossary › python › range-function
Python range() Function [Python Tutorial]
To reverse a range, you can also use the reversed() function with range(). Reversing the order of a range can help you iterate over a sequence in the opposite order, like in countdowns.
🌐
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 - You can also use the range() function to generate a sequence of numbers in reverse order.
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-range.html
Python range() Function
This works nicely with range() to go over the regular numbers in reverse order: >>> s = 'Python' >>> len(s) 6 >>> for i in reversed(range(len(s))): ... print(i, s[i]) ...
🌐
Delft Stack
delftstack.com › home › howto › python › python backward range
How to Get Range Backwards in Python | Delft Stack
March 4, 2025 - In this example, my_list[::-1] creates a new list that contains all the elements of my_list in reverse order. The slice notation [::-1] indicates that we want to take the entire list but step backwards through it. This method is not only concise but also very readable, making it a favorite among Python developers when they need to iterate backwards. Iterating backwards in Python using the range() function, reversed() function, or list slicing can significantly enhance your programming efficiency.
🌐
LearnPython.com
learnpython.com › tags › reverse-range
Reverse Range | LearnPython.com
September 7, 2022 - Early in your Python journey, you’ll start working with sequences and ranges. At some point, you may wonder ‘How would I get these values in the reverse order?’. If you think about it, we reverse ranges constantly: when we sort files in our computer from ascending to descending order, we effectively reverse their original order.