How to Iterate Through a List Backward in Python

To iterate through a list backward in Python, wrap it in the built-in reversed() function: for item in reversed(my_list):. It walks from the last item to the first, doesn’t copy the list and doesn’t change it:

for item in reversed(my_list):
    print(item)

I tested all of this on Python 3.12.5 under Windows, so each output block is pasted straight from a real run.

Beyond reversed(), I’ll show slicing, index loops with range(), getting the index too, safe deletes and the fastest option.

Loop backward over a list with reversed()

reversed() returns a lazy iterator. It hands you one item at a time from the end, with no copy. Here it lists 2026 orders newest first:

orders = ["Jan 05 2026  $120.50", "Feb 11 2026  $89.99",
          "Mar 02 2026  $240.00", "Apr 18 2026  $15.75"]

print("Newest order first:")
for order in reversed(orders):
    print("  ", order)

print("List unchanged:", orders[0])
print(reversed(orders))          # a lazy iterator, not a new list

Output:

Newest order first:
   Apr 18 2026  $15.75
   Mar 02 2026  $240.00
   Feb 11 2026  $89.99
   Jan 05 2026  $120.50
List unchanged: Jan 05 2026  $120.50
<list_reverseiterator object at 0x000002E392E48AC0>
Command Prompt output of Python reversed() looping over a list of 2026 orders from newest to oldest
The orders print newest first, the original list still starts with the January order, and printing the object shows a list_reverseiterator.

Notice the last line: the list itself didn’t move. If you actually want the list flipped in place, that’s a different job, covered in the Python list reverse() method.

Iterate a list backward with slicing [::-1]

A slice with a step of -1 builds a reversed copy, and your loop walks the copy. It reads well and lets you start, stop or skip as you go backward:

cities = ["Boston", "Chicago", "Denver", "Phoenix", "Seattle"]

for city in cities[::-1]:          # walks a reversed copy
    print(city, end="  ")
print()

for city in cities[-1:-4:-1]:      # last three, backward
    print(city, end="  ")
print()

Output:

Seattle  Phoenix  Denver  Chicago  Boston  
Seattle  Phoenix  Denver

The cost is memory: [::-1] copies every reference in the list first. That’s fine for a few thousand items. The start, stop and step rules are explained in slicing lists in Python.

Loop backward by index with range()

When you need the position, count down with range(start, stop, step). Start at len(list) - 1, stop at -1 (the stop value is excluded) and step by -1:

temps = [68, 71, 75, 73, 80]       # Mon..Fri highs in Fahrenheit
days = ["Mon", "Tue", "Wed", "Thu", "Fri"]

for i in range(len(temps) - 1, -1, -1):
    print(f"index {i}: {days[i]} {temps[i]} F")

Output:

index 4: Fri 80 F
index 3: Thu 73 F
index 2: Wed 75 F
index 1: Tue 71 F
index 0: Mon 68 F

The stop value trips people up. range(len(temps) - 1, 0, -1) would quietly skip index 0. For more on the three arguments, see for i in range() in Python.

How do you get the index and value when looping backward?

reversed(enumerate(tasks)) fails, because enumerate returns an iterator that can’t be reversed. You have two working options:

tasks = ["Book flight", "Reserve hotel", "Rent car", "Pack bags"]

# 1) original index, newest first
for i, task in reversed(list(enumerate(tasks))):
    print(i, task)

print("---")
# 2) no extra list: compute the index from the reversed position
last = len(tasks) - 1
for n, task in enumerate(reversed(tasks)):
    print(last - n, task)

Output:

3 Pack bags
2 Rent car
1 Reserve hotel
0 Book flight
---
3 Pack bags
2 Rent car
1 Reserve hotel
0 Book flight

The first builds a temporary list of pairs; the second skips it and computes the original index. I cover more enumerate() patterns in enumerate() in Python.

Remove items from a list by looping backward

This is the classic reason to go backward. Delete while looping forward and every later item shifts left, so the loop skips the item right after each delete. Going backward avoids that:

prices = [19.99, 0.00, 4.50, 0.00, 0.00, 12.25]

# Forward loop with del skips items: the list shifts under the loop
bad = prices.copy()
for i in range(len(bad)):
    if i < len(bad) and bad[i] == 0.00:
        del bad[i]
print("forward :", bad)

# Backward loop: deleting never moves the items you haven't visited yet
good = prices.copy()
for i in range(len(good) - 1, -1, -1):
    if good[i] == 0.00:
        del good[i]
print("backward:", good)

Output:

forward : [19.99, 4.5, 0.0, 12.25]
backward: [19.99, 4.5, 12.25]
Command Prompt output comparing a forward and a backward Python loop that delete zero prices from a list
The forward loop leaves one 0.0 behind because it skipped an item after a delete; the backward loop removes all three.

For bigger cleanups, a list comprehension that keeps what you want is usually clearer. Other approaches are in removing multiple elements from a list in Python.

Which objects can reversed() loop over?

reversed() works on sequences (lists, tuples, strings, ranges) and, since Python 3.8, on dicts. It doesn’t work on generators or sets, because they can’t be walked from the end:

print(list(reversed("Texas")))
print(list(reversed(range(1, 6))))
print(list(reversed((10, 20, 30))))
print(list(reversed({"NY": 1, "CA": 2, "TX": 3})))   # dict keys, Python 3.8+

squares = (n * n for n in range(4))
try:
    reversed(squares)
except TypeError as err:
    print("TypeError:", err)
print(list(reversed(list(squares))))                  # make it a list first

Output:

['s', 'a', 'x', 'e', 'T']
[5, 4, 3, 2, 1]
[30, 20, 10]
['TX', 'CA', 'NY']
TypeError: 'generator' object is not reversible
[9, 4, 1, 0]
Command Prompt output of Python reversed() on a string, range, tuple and dict, then a TypeError for a generator
Strings, ranges, tuples and dict keys all reverse; the generator raises a TypeError until it’s turned into a list.

For a set, sort it or convert it to a list before you loop.

Which backward-loop method is fastest in Python?

I timed the three main approaches over a one-million-item list and checked how much memory each one holds:

import sys, timeit

data = list(range(1_000_000))

def with_reversed():
    for x in reversed(data): pass

def with_slice():
    for x in data[::-1]: pass

def with_range():
    for i in range(len(data) - 1, -1, -1): data[i]

for fn in (with_reversed, with_slice, with_range):
    best = min(timeit.repeat(fn, number=5, repeat=3)) / 5 * 1000
    print(f"{fn.__name__:<14} {best:6.1f} ms per loop")

print("reversed() object:", sys.getsizeof(reversed(data)), "bytes")
print("data[::-1] copy:  ", sys.getsizeof(data[::-1]), "bytes")

Output:

with_reversed     6.8 ms per loop
with_slice       13.1 ms per loop
with_range       21.1 ms per loop
reversed() object: 48 bytes
data[::-1] copy:   8000056 bytes
Command Prompt output timing Python reversed(), [::-1] slicing and range() index loops over a million items, plus their memory sizes
The index loop with range() is the slowest, and the reversed() iterator takes a few dozen bytes while the slice copy takes megabytes.

Milliseconds vary between runs, but the pattern holds: reversed() is quick and nearly free on memory.

Backward iteration methods compared

MethodCopies the list?Gives the index?Best for
reversed(lst)NoNoMost loops
lst[::-1]YesNoSmall lists, skipping with a step
range(len(lst) - 1, -1, -1)NoYesDeleting or editing by position
reversed(list(enumerate(lst)))Pairs onlyYesIndex and value together

If you’d rather flip the list permanently than loop over it, read how to reverse a list in Python.

Want to keep going with sequences? Start with one of these:

Frequently asked questions

How do I loop through a list backward in Python?

Use for item in reversed(my_list):. It doesn’t copy or change the list.

Does reversed() change the original list?

No. It returns an iterator over the same list. Use my_list.reverse() if you want the list itself flipped.

What’s the difference between reversed() and [::-1]?

reversed() is a lazy iterator that uses almost no memory. [::-1] builds a full reversed copy of the list first.

How do I loop backward with the index?

Use for i in range(len(lst) - 1, -1, -1):, or for i, x in reversed(list(enumerate(lst))): to get index and value.

Why does reversed() raise a TypeError?

It isn’t a sequence, like a generator or set. Wrap it in list() first.

Where is reversed() documented?

See reversed() in the Python docs.