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
🌐
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) ...
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
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 way, check PEP 0322. This is Python3 pythonic example ... More on stackoverflow.com
🌐 stackoverflow.com
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
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
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python for loop in backwards
Python For Loop in Backwards - Spark By {Examples}
May 31, 2024 - Following are the examples of for loop in backwards # Example 1: Get the loop iteration in Backwards # Using reversed() print("Get the loop in backwards") for i in reversed(range(1,6)): # Example 2: Get the for loop in backwards using range() ...
🌐
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]]
🌐
Codecademy
codecademy.com › article › how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
Yes! You can use slicing ([::-1]), reversed(), a for loop, or recursion to reverse a list without using .reverse(). No, slicing creates a new list. The original list remains unchanged.
Find elsewhere
🌐
LearnPython.com
learnpython.com › blog › reverse-range-in-python
How to Reverse a Range in Python | LearnPython.com
September 7, 2022 - For example, provided a number n, range() produces integers from 0 up to n-1. In the example above, we passed 5 to the range() function, so the last number printed was 4 (since 5 - 1 = 4). Sometimes, you may not care about the numbers in the range.
🌐
TechBeamers
techbeamers.com › reverse-list-python
How to Reverse a List in Python - TechBeamers
November 30, 2025 - The itertools module in Python provides a set of functions for efficient looping and iteration. The zip() function, in combination with the function, itertools.islice() can be used to reverse a list efficiently.
🌐
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 - This example yields the below output. # 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.
🌐
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 ... >>> numbers = (1, 2, 3, 4, 5) ...
🌐
Real Python
realpython.com › python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() – Real Python
June 28, 2023 - For example, to reverse the list represented in the diagram, you can loop over the first half of the list and swap the element at index 0 with its mirror at index -1 in the first iteration.
🌐
Real Python
realpython.com › python-range
Python range(): Represent Numerical Ranges – Real Python
November 24, 2024 - for i in range(5) is a loop that iterates over the numbers from 0 to 4, inclusive. 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()....
🌐
Stack Abuse
stackabuse.com › bytes › traversing-a-list-in-reverse-order-in-python
Traversing a List in Reverse Order in Python
August 30, 2023 - 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. Here's a quick example: my_list = [1, 2, 3, 4, 5] for i in reversed(my_list): print(i)
🌐
Python Help
pythonhelp.org › python-lists › how-to-reverse-a-list-in-python-using-for-loop
Reversing a List in Python Using For Loop
In this example, we are using for loop to iterate over indices and append the elements in reverse order into the new list, resulting in a reversed version of the original list. Written for working developers, Coding with AI goes beyond hype ...
🌐
Newtum
blog.newtum.com › reverse-a-number-in-python-using-for-loop
Reverse a Number in Python Using For Loop - Newtum
October 14, 2024 - The ‘for’ loop iterates through the length of the ‘num’ string in reverse order, starting from the last index and ending at the first index. In each iteration, the current character at the index is added to the ‘reverse’ variable using the ‘+=’ operator. Finally, the reversed string is printed as output: ‘654321’. Understand the Concept of Reverse a Number in Python Using While Loop, Here!
🌐
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)
🌐
TutorialsPoint
tutorialspoint.com › article › backward-iteration-in-python
Backward iteration in Python
2 weeks ago - Python provides three common ... index and step backwards by -1 until index 0 ? days = ['Mon', 'Tue', 'Wed', 'Thu'] for i in range(len(days) - 1, -1, -1): print(days[i])...
🌐
Replit
replit.com › home › discover › how to iterate backwards in python
How to iterate backwards in Python | Replit
1 month ago - The loop starts at 5 and is told to count down with a step of -1. Because the stop value 10 is already higher than the start, the sequence is empty from the beginning. The example below shows the correct approach. # Correctly specifying start > end for reverse iteration for i in range(10, 4, -1): print(i, end=' ') # Prints: 10 9 8 7 6 5