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
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ range-function
Python range() Function [Python Tutorial]
Reversing the order of a range can help you iterate over a sequence in the opposite order, like in countdowns.
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
๐ŸŒ
LearnPython.com
learnpython.com โ€บ blog โ€บ reverse-range-in-python
How to Reverse a Range in Python | LearnPython.com
Learn how to reverse a range in Python using the range(), reversed(), and sorted() functions.
Find elsewhere
๐ŸŒ
LearnPython.com
learnpython.com โ€บ tags โ€บ reverse-range
Reverse Range | LearnPython.com
September 7, 2022 - 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.
๐ŸŒ
Real Python
realpython.com โ€บ python-range
Python range(): Represent Numerical Ranges โ€“ Real Python
November 24, 2024 - For example, range(5, 0, -1) creates a range that counts down from 5 to 1, inclusive. To reverse a general range, use reversed(). Can you use range() with negative numbers in Python?Show/Hide
๐ŸŒ
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.
๐ŸŒ
Real Python
realpython.com โ€บ python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() โ€“ Real Python
June 28, 2023 - The magic in this list comprehension comes from the call to range(). In this case, range() returns indices from len(digits) - 1 back to 0. This makes the comprehension loop iterate over the items in digits in reverse, creating a new reversed ...
๐ŸŒ
Kanaries
docs.kanaries.net โ€บ topics โ€บ Python โ€บ python-reverse-range
How to Use Python Reverse Range: Easy Guide โ€“ Kanaries
June 6, 2023 - Reverse range is basically decrementing the range. When your step is negative, you move through a series of decreasing numbers. ... This will give you a series of numbers that are each smaller than the preceding number by 2. While range() with a negative step does a fantastic job creating a ...
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-reverse-list
Python Reverse List: How to Reorder Your Data | DataCamp
February 27, 2025 - #Python reversed() to save memory with large lists large_list = range(1000000) for item in reversed(large_list): Process items in reverse pass
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ range
Python's range() function - Python Morsels
January 14, 2025 - Note that even when going in reverse, we stop just before our stop value. We're not stopping at 0 above, but at 1. You can think of the three arguments given to range as similar to the three values we can use when slicing a sequence in Python:
๐ŸŒ
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]) ...
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ functions.html
Built-in Functions โ€” Python 3.14.4 documentation
February 27, 2026 - The argument 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).
๐ŸŒ
YouTube
youtube.com โ€บ codedash
python range reverse - YouTube
Download this code from https://codegive.com Title: Python Range Reverse: A Step-by-Step TutorialIntroduction:The range() function in Python is commonly used...
Published ย  February 2, 2024
Views ย  2
๐ŸŒ
Flexiple
flexiple.com โ€บ python โ€บ python-range-reverse
How to reverse a range in Python? | Flexiple Tutorials | Python - Flexiple
March 14, 2022 - For this, we use the reversed() function in Python. This function reverses the arguments passed. ... This is how you can use Python range to reverse a list of numbers.
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ looping-in-reverse
Looping in reverse - Python Morsels
May 27, 2025 - 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: >>> for color in colors[::-1]: ... print("I like", color) ... I like red I like pink I like green I like blue I like purple ยท But this only works for sequences (meaning iterables that can be indexed). Also, it looks a little bit weird. ... Lists in Python have a reverse method.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_reversed_function.htm
Python reversed() Function
The Python reversed() function returns an iterator object which allows us to access the specified sequence in reverse order. This function is commonly used in the situation where we want to iterate over the elements of a sequence in reverse, without
๐ŸŒ
Wsldp
elearning.wsldp.com โ€บ python3 โ€บ python-range-reverse
Python Range Reverse, For Loop Reverse Range
July 8, 2021 - Following is another code example that generates a sequence of numbers in reverse order in steps of three: ... The syntax of the Python range function is range(start, stop, step_count).
๐ŸŒ
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 - There are several ways to reverse the range of numbers, for example, by using the reversed(), and sorted() built-in functions and by iterating using for loop and printing the elements in reverse order.