Try range(100,-1,-1), the 3rd argument being the increment to use (documented here).

("range" options, start, stop, step are documented here)

Answer from 0x6adb015 on Stack Overflow
🌐
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]] ... Using a while loop provides you control over the iteration process. This is need to manually control the index and decrement the index during each iteration to traverse the it backward.
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
python - How can I reverse index and -1 each loop - Stack Overflow
I believe I have the power part ... 2 ^ 1 for the next digit and so on. But I am having trouble getting the first part of the equation, the right most digit of the value inputted. So let's say, 0101 was inputted. I want 1 * ( 2 ^ 0 ) in the first loop, 0 * ( 2 ^ 1) in the second loop, and so on; right to left. So with how indexing works in Python, how can I reverse index it so ... More on stackoverflow.com
🌐 stackoverflow.com
Iterate Backwards in Python with Index - TestMu AI Community
How can I iterate backwards in Python to traverse a list in reverse order, starting from collection[len(collection)-1] and ending at collection[0]? I also want to be able to access the loop index during the iteration. More on community.testmuai.com
🌐 community.testmuai.com
0
December 8, 2024
loops - Traverse a list in reverse order in Python - Stack Overflow
How do I traverse a list in reverse order in Python? So I can start from collection[len(collection)-1] and end in collection[0]. I also want to be able to access the loop index. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Quora
quora.com › How-do-I-write-a-program-in-Python-using-a-for-loop-by-the-reverse-indexing-method
How to write a program in Python using a for loop by the reverse indexing method - Quora
Answer (1 of 2): Upon doing a quick search, the reverse indexing method involves iterating through a group of stored values or string in reverse order. In other words, we begin from the end of the list or string until we reach its first value.
🌐
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) ...
🌐
Medium
geekpython.medium.com › 8-ways-to-reverse-the-elements-in-a-python-list-ad50889bdd7e
8 Ways To Reverse The Elements In A Python List | by Sachin Pal | Medium
November 25, 2022 - Python reversed() function is also used to reverse the elements inside the list. Still, instead of returning the reversed object, it returns the reversed iterator object that accesses the values of a given sequence.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python for loop in backwards
Python For Loop in Backwards - Spark By {Examples}
May 31, 2024 - You can use range() function along with the len() function to get the loop iteration in the backward direction. You can specify a range with starting value len(list) -1, ending value -1, and incrementing value -1 to help by getting list values ...
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › backward-iteration-in-python
Backward iteration in Python
August 7, 2019 - To achieve this we need to read the last element first and then the last but one and so on till the element at index 0. Various python programming features can be used to achieve this. We are using the range function but starting with the position -1. This value helps us read the list from ...
🌐
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.
🌐
Stack Overflow
stackoverflow.com › questions › 40163542 › how-can-i-reverse-index-and-1-each-loop
python - How can I reverse index and -1 each loop - Stack Overflow
Am I right in saying that it starts at index value -1 (right most) and then for every loop, -1 is added on? To then make -2 and so on? 2016-10-20T21:43:16.687Z+00:00 ... value = input("Enter the binary value to convert to a decimal number.") power = 0 ans = 0 for i in reversed(value): prod = int(i) * (2**power) ans = prod + ans power += 1 else: print(ans)
🌐
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().
🌐
TestMu AI Community
community.testmuai.com › ask a question
Iterate Backwards in Python with Index - TestMu AI Community
December 8, 2024 - How can I iterate backwards in Python to traverse a list in reverse order, starting from collection[len(collection)-1] and ending at collection[0]? I also want to be able to access the loop index during the iteration.
🌐
The Knowledge Academy
theknowledgeacademy.com › blog › python-enumerate
Python Enumerate(): Everything You Should Know
February 11, 2026 - This technique works with any iterable that supports reverse iteration, such as lists, Python String, or other sequences. Here’s how you can achieve it: ... If you want to iterate a list in reverse order to get the index, you can utilise ‘reversed’ with ‘enumerate.’ ... You can iterate in reverse using a custom start index manually. ... By using ‘reversed’ and ‘enumerate,’ you can loop through an iterable in reverse order while tracking both the index and the value.
🌐
Vertabelo
academy.vertabelo.com › blog › how-do-you-list-reverse-in-python
Vertabelo Academy Blog | How Do You List Reverse in Python?
March 3, 2020 - This reverses the list by using a for loop. In the for loop, we defined a range of indexes?—?starting again from the last index and stopping at 0.
🌐
Towards Data Science
towardsdatascience.com › home › latest › how to reverse python lists more efficiently
How To Reverse Python Lists More Efficiently | Towards Data Science
January 20, 2025 - 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). This approach is recommended when it comes to performing backwards iteration over a list. >>> my_lst = [10, 0, 30, 25, 40, 100, 80] >>> my_lst_reverse_iter = reversed(my_lst) >>> my_lst_reverse_iter <list_reverseiterator object at 0x10afcae20> As you can see, the reversed() function returned an Iterator we can loop over it: >>> for element in my_lst_reverse_iter: ...
🌐
datagy
datagy.io › home › python posts › how to reverse a python list (6 ways)
How to Reverse a Python List (6 Ways) • datagy
February 15, 2023 - The best way to reverse a list using slicing in Python is to use negative indexing. This allows you to step over a list using -1, by using the code list[::-1]. What is the fastest way to reverse a list in Python? The fastest way to reverse a list in Python is to use a for loop (or a list comprehension).