You can use slicing:

for item in some_list[2:]:
    # do stuff

This will start at the third element and iterate to the end.

Answer from Björn Pollex on Stack Overflow
Discussions

How do you start a for loop at 1 instead of 0?
Hi! I'm working on a bot to reply with suggestions for common python problems. This might not be very helpful to fix your underlying issue, but here's what I noticed about your submission: You are looping over an object using something like for x in range(len(items)): foo(item[x]) This is simpler and less error prone written as for item in items: foo(item) If you DO need the indexes of the items, use the enumerate function like for idx, item in enumerate(items): foo(idx, item) More on reddit.com
🌐 r/learnpython
16
6
November 13, 2015
python - How to start from second index for for-loop - Stack Overflow
My range is 5 but I want to skip 1 from this range and start from i=2 in this range 2018-12-04T21:47:34.503Z+00:00 ... I want my for loop get the index of the second value in the list and do the iteration to end 2018-12-04T21:56:17.69Z+00:00 ... You should avoid using names of built-ins. If you really must, add an underscore at ... More on stackoverflow.com
🌐 stackoverflow.com
python - How can I access the index value in a 'for' loop? - Stack Overflow
And note that Python's indexes start at zero, so you would get 0 to 4 with the above. If you want the count, 1 to 5, do this: count = 0 # in case items is empty and you need it after the loop for count, item in enumerate(items, start=1): print(count, item) More on stackoverflow.com
🌐 stackoverflow.com
May 12, 2021
Can a for loop start somewhere other than 0?
Sure, slice the list: for x in l[2:]: More on reddit.com
🌐 r/learnpython
60
113
June 21, 2022
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › how to start python for loop at 1
How to Start Python For Loop at 1 - Spark By {Examples}
May 31, 2024 - We can start the for a loop at index 1 in several ways in Python, in general, the for loop is used to iterate over a sequence (such as a list,
🌐
Python Guides
pythonguides.com › python-for-loop-index
How to Use Python For Loop with Index
October 14, 2025 - As a rule of thumb, use enumerate() whenever possible; it’s clean, efficient, and widely accepted in the Python community. Modifying the list while looping: Avoid changing the list (adding or removing elements) inside the for loop. It can cause unexpected behavior or index errors. Using wrong start index: Remember that Python uses zero-based indexing.
🌐
DaniWeb
daniweb.com › programming › software-development › threads › 402440 › looping-through-a-list-starting-at-index-2
python - Looping through a list starting at index ... [SOLVED] | DaniWeb
December 22, 2011 - IndexError typically comes from loops like for i in range(2, len(line)+1). The last valid index is len(line)-1. Prefer slicing/iterators to avoid off-by-one errors. Normalize case and strip punctuation before membership tests so Word, matches word. See Python docs for islice, set membership, and string.punctuation. ... This'll iterate through the items in lines starting at index 2 ending at index len(lines) - 1.
🌐
Delft Stack
delftstack.com › home › howto › python › python for loop start at 1
How to Start a for Loop at 1 in Python | Delft Stack
March 11, 2025 - One of the most straightforward methods to start a for loop at 1 in Python is by utilizing the range() function. The range() function generates a sequence of numbers, and you can specify the starting point, which is particularly useful when ...
🌐
Sentry
sentry.io › sentry answers › python › accessing the index in a `for` loop in python
Accessing the Index in a `for` Loop in Python | Sentry
November 22, 2022 - So rather than saying “do this n times”, a foreach loop essentially says “do this to everything in the sequence”. For scenarios where we actually need the index or counter variable, we can use Python’s built-in enumerate function. The enumerate function returns an iterable.
Find elsewhere
🌐
Programiz
programiz.com › python-programming › examples › index-for-loop
Python Program to Access Index of a List Using for Loop
The value of the parameter start provides the starting index. my_list = [21, 44, 35, 11] for index in range(len(my_list)): value = my_list[index] print(index, value) ... You can access the index even without using enumerate(). Using a for loop, iterate through the length of my_list.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-start-a-for-loop-at-1-python
How to start a for loop at 1 - Python - GeeksforGeeks
July 23, 2025 - In this example, the list numbers starts at 1 so the loop iterates directly over the elements without needing range. If we are iterating over a collection but need an index that starts at 1 the enumerate() function is useful.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python – access index in for loop with examples
Python - Access Index in For Loop With Examples - Spark By {Examples}
May 31, 2024 - In the below example, the start=1 parameter is used in the enumerate function to start the index at 1. This way, the loop iterates over the elements in the list, and the index variable starts from 1 instead of 0. # Start loop indexing with non ...
🌐
Codingem
codingem.com › home › python for loop with index: access the index in a for loop
Python For Loop with Index: Access the Index in a For Loop - codingem.com
March 14, 2024 - In the previous example, the indexing ... it possible to specify a non-zero starting index. ... Call the enumerate() function on the iterable and specify the start parameter. Access the index, element pairs using a for…in ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-access-index-in-for-loop-python
How to Access Index using for Loop - Python - GeeksforGeeks
July 23, 2025 - data = ["java", "python", "HTML", "PHP"] print("Indices:", [i for i in range(len(data))]) print("Elements:", [data[i] for i in range(len(data))]) ... Explanation: [i for i in range(len(data))] creates a list of indices.
🌐
iO Flood
ioflood.com › blog › python-for-loop-with-index
Learn Python: For Loops With Index (With Examples)
June 7, 2024 - One of the most common mistakes when using a for loop with an index in Python is the off-by-one error. This occurs when you expect the index to start at 1, but in Python, indices start at 0.
Top answer
1 of 16
9261

Use the built-in function enumerate():

for idx, x in enumerate(xs):
    print(idx, x)

It is non-Pythonic to manually index via for i in range(len(xs)): x = xs[i] or manually manage an additional state variable.

Check out PEP 279 for more.

2 of 16
1371

Using a for loop, how do I access the loop index, from 1 to 5 in this case?

Use enumerate to get the index with the element as you iterate:

for index, item in enumerate(items):
    print(index, item)

And note that Python's indexes start at zero, so you would get 0 to 4 with the above. If you want the count, 1 to 5, do this:

count = 0 # in case items is empty and you need it after the loop
for count, item in enumerate(items, start=1):
    print(count, item)

Unidiomatic control flow

What you are asking for is the Pythonic equivalent of the following, which is the algorithm most programmers of lower-level languages would use:

index = 0            # Python's indexing starts at zero
for item in items:   # Python's for loops are a "for each" loop 
    print(index, item)
    index += 1

Or in languages that do not have a for-each loop:

index = 0
while index < len(items):
    print(index, items[index])
    index += 1

or sometimes more commonly (but unidiomatically) found in Python:

for index in range(len(items)):
    print(index, items[index])

Use the Enumerate Function

Python's enumerate function reduces the visual clutter by hiding the accounting for the indexes, and encapsulating the iterable into another iterable (an enumerate object) that yields a two-item tuple of the index and the item that the original iterable would provide. That looks like this:

for index, item in enumerate(items, start=0):   # default is zero
    print(index, item)

This code sample is fairly well the canonical example of the difference between code that is idiomatic of Python and code that is not. Idiomatic code is sophisticated (but not complicated) Python, written in the way that it was intended to be used. Idiomatic code is expected by the designers of the language, which means that usually this code is not just more readable, but also more efficient.

Getting a count

Even if you don't need indexes as you go, but you need a count of the iterations (sometimes desirable) you can start with 1 and the final number will be your count.

count = 0 # in case items is empty
for count, item in enumerate(items, start=1):   # default is zero
    print(item)

print('there were {0} items printed'.format(count))

The count seems to be more what you intend to ask for (as opposed to index) when you said you wanted from 1 to 5.


Breaking it down - a step by step explanation

To break these examples down, say we have a list of items that we want to iterate over with an index:

items = ['a', 'b', 'c', 'd', 'e']

Now we pass this iterable to enumerate, creating an enumerate object:

enumerate_object = enumerate(items) # the enumerate object

We can pull the first item out of this iterable that we would get in a loop with the next function:

iteration = next(enumerate_object) # first iteration from enumerate
print(iteration)

And we see we get a tuple of 0, the first index, and 'a', the first item:

(0, 'a')

we can use what is referred to as "sequence unpacking" to extract the elements from this two-tuple:

index, item = iteration
#   0,  'a' = (0, 'a') # essentially this.

and when we inspect index, we find it refers to the first index, 0, and item refers to the first item, 'a'.

>>> print(index)
0
>>> print(item)
a

Conclusion

  • Python indexes start at zero
  • To get these indexes from an iterable as you iterate over it, use the enumerate function
  • Using enumerate in the idiomatic way (along with tuple unpacking) creates code that is more readable and maintainable:

So do this:

for index, item in enumerate(items, start=0):   # Python indexes start at zero
    print(index, item)
🌐
Quora
quora.com › Why-does-Python-start-at-index-1-when-iterating-an-array-backwards
Why does Python start at index 1 when iterating an array backwards? - Quora
Answer (1 of 4): It doesn’t, it starts at -1. But before we get to that, we should note that whether we’re talking about a list, string, tuple, or other iterable, Python indices are actually offsets. Let’s just use a list (as opposed to an array, which is not a native Python datatype).
🌐
Enterprise DNA
blog.enterprisedna.co › python-for-loop-index
Python for Loop Index: How to Access It (5 Easy Ways) – Master Data Skills + AI
The enumerate() function is a built-in Python function that allows you to loop through both the index and the value of an iterable simultaneously. It returns an enumerate object which yields pairs containing the index and the value of each item in the iterable.
🌐
Note.nkmk.me
note.nkmk.me › home › python
How to Start enumerate() at 1 in Python | note.nkmk.me
May 6, 2023 - ... By passing an iterable object to enumerate(), you can get index, element. for i, name in enumerate(l): print(i, name) # 0 Alice # 1 Bob # 2 Charlie ... As demonstrated in the example above, the index of enumerate() starts at 0 by default.
🌐
Python Morsels
pythonmorsels.com › looping-with-indexes
Looping with indexes - Python Morsels
October 8, 2020 - We start n at 1 and we're incrementing it by 1 in each iteration of our loop. Instead of keeping track of counter ourselves, how about thinking in terms of indices and using range(len(favorite_fruits)) to grab each of the indexes of all the items in this list: >>> favorite_fruits = ["jujube", "pear", "watermelon", "apple", "blueberry"] >>> >>> for i in range(len(favorite_fruits)): ...