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 - Backward iteration in Python is traversing a sequence (like list, string etc.) in reverse order, moving from the last element to the first.
Discussions

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
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
How can I search backwards through a list without actually reversing the list order?
You can iterate backwards, with the correct indices, like this: for i,x in reversed(list(enumerate(numbers))): You can skip the first value, starting from the end, by using a set to keep track of values once you've seen them, and quickly checking it to see if it's already been seen. It's somewhat traditional to name this set "seen". More on reddit.com
🌐 r/learnpython
17
9
April 18, 2021
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
🌐
TutorialsPoint
tutorialspoint.com › article › backward-iteration-in-python
Backward iteration in Python
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 ?
🌐
Medium
medium.com › becoming-a-better-software-developer › undetstanding-python-iterators-reversed-iteration-35f1c1d16196
Understanding Python Iterators: Reversed Iteration | by Saleem Latif | Becoming a better Software Developer | Medium
May 12, 2026 - Reversed iteration is a technique that allows you to iterate over a sequence of elements in reverse order. In Python, you can reverse iterate over a sequence by using the reversed() function.
🌐
Delft Stack
delftstack.com › home › howto › python › loop backwards in python
How to Loop Backward Iteration in Python | Delft Stack
March 11, 2025 - Learn how to perform backward iteration in Python with various methods like range(), list slicing, and the reversed() function. This article provides clear examples and explanations to help you understand how to loop backward effectively. Perfect for beginners and experienced programmers alike, discover the best practices for iterating in reverse order.
🌐
GeeksforGeeks
geeksforgeeks.org › python › backward-iteration-in-python
Backward iteration in Python - GeeksforGeeks
July 11, 2025 - Backward iteration in Python is traversing a sequence (like list, string etc.) in reverse order, moving from the last element to the first.
Find elsewhere
🌐
Purelogic
purelogic.blog › iterating-backwards-in-python
Ultimate Guide to Iterating Backwards in Python: Techniques and Best Practices - Purelogic.blog
Iterating backwards in Python allows you to traverse a sequence in reverse order. This is useful for tasks like reversing a list or string, processing data from the last element, or analyzing data in a reverse chronological order. Common methods include slicing with negative strides, using ...
🌐
Hillsdale Cloud Hub
aws.hillsdale.edu › home › redhat › reversed python: unlocking the power of backward iteration in python programming
Reversed Python: Unlocking the Power of Backward Iteration in Python Programming - Hillsdale Cloud Hub
June 16, 2025 - The built-in `reversed()` function in Python is a key component in achieving backward iteration. This function returns a reverse iterator, which allows you to traverse a sequence in reverse order.
🌐
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:
🌐
CodeRivers
coderivers.org › blog › iterate-backwards-python
Iterating Backwards in Python: A Comprehensive Guide - CodeRivers
February 22, 2026 - The range() function in Python can be used to generate a sequence of numbers. By specifying a negative step value, we can create a sequence that counts down. This can be used to iterate backwards over a sequence using its indices.
🌐
Delft Stack
delftstack.com › home › howto › python › python iterate list backwards
How to Iterate List Backwards in Python | Delft Stack
March 13, 2025 - The slice notation [::-1] tells Python to start from the end of the list and move backwards. This method is not only concise but also very Pythonic. However, it’s important to note that this approach creates a new list in memory, which may ...
🌐
CodeRivers
coderivers.org › blog › python-iterate-backwards
Python Iterate Backwards: A Comprehensive Guide - CodeRivers
April 13, 2025 - For a list my_list = [1, 2, 3, 4, 5], the indices start from 0 for the first element, 1 for the second, and so on. When iterating backwards, we start from the last element, which has an index of len(my_list) - 1 and move towards the first element with index 0.
🌐
Exercism
exercism.org › tracks › python › exercises › reverse-string › approaches › backward-iteration-with-range
Explore the 'Backward iteration with range' approach for Reverse String in Python on Exercism
February 15, 2025 - Explore the 'Backward iteration with range' approach for Reverse String in Python on Exercism. Use a negative step with range() to iterate backward and append to a new string.
🌐
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 - Reversing a list or looping over ... make this process clean and readable. ... The reversed() function returns an iterator that yields the elements of the list in reverse order....
🌐
Delft Stack
delftstack.com › home › howto › python › python iterate backwards
How to Iterate Backwards in Python | Delft Stack
March 11, 2025 - This article discusses how to iterate backwards in Python, exploring various methods like the reversed() function, list slicing, while loops, and enumerate. With clear code examples and detailed explanations, you'll learn to efficiently traverse ...
🌐
Plain English
python.plainenglish.io › mastering-reverse-looping-in-python-a-comprehensive-guide-4a6380f623ca
Mastering Reverse Looping in Python: A Comprehensive Guide
March 25, 2024 - Reverse looping is the process of iterating over a sequence from the end to the beginning. It is particularly useful when you need to process elements in reverse order or solve problems that require traversing a sequence backwards...
🌐
Steemit
steemit.com › python › @makerhacks › reversing-iteration-going-through-a-list-forwards-and-backwards-in-python
Reversing Iteration: Going through a list forwards and backwards in Python — Steemit
May 29, 2018 - Fortunately, you CAN iterate via the index number of the array, but it means you need a little extra in your code to make navigating the list simple. You recall my imageviewer needs to be able to skip through images. In this enhancement we make the left cursor go back, every other interaction continues to go forward through the list.
🌐
EyeHunts
tutorial.eyehunts.com › home › reverse for loop in python | example code
Reverse for loop in Python | Example code - EyeHunts
September 8, 2021 - To reverse for loop in Python just need to read the last element first and then the last but one and so on till the element is at index 0. You can do it with the range function, List Comprehension, or reversed() function.