The for index in range(len(list)) loop executes the loop body with index first set to 0, then 1, then 2, etc. up to len(list) - 1. The previous value of index is ignored and overwritten. If you want index to start at iteration + 1, use the 2-argument form of range:

for index in range(iteration + 1, len(list)):
Answer from user2357112 on Stack Overflow
🌐
W3Schools
w3schools.com › python › python_for_loops.asp
Python For Loops
To loop through a set of code a specified number of times, we can use the range() function, The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.
Discussions

Python for loop start counter initialization - Stack Overflow
The for index in range(len(list)) loop executes the loop body with index first set to 0, then 1, then 2, etc. up to len(list) - 1. The previous value of index is ignored and overwritten. If you want index to start at iteration + 1, use the 2-argument form of range: More on stackoverflow.com
🌐 stackoverflow.com
python - How to start a for loop from the end of a vector, and at the value 0 do something - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... I have to start looping a vector from its end to zero. When I meet the value 0 I need to replace it with the sum of the three previews values. More on stackoverflow.com
🌐 stackoverflow.com
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
pygame - Python for loop does not start anymore at 0 - Stack Overflow
The method mover works fine till the elements of the list are organized in a different order than before. At this time in the method mover, the z variable gets 4 and then the for loop (line 39) cou... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Quora
quora.com › Do-for-and-while-loops-begin-at-0-or-1
Do for and while loops begin at 0 or 1? - Quora
Answer (1 of 17): In most modern languages - they do what you tell them to do. [code]for ( i = 0 ; i
🌐
Codecademy
codecademy.com › forum_questions › 4f52839209a70f0003014446
2.4: Why does the loop start at 0 and not 1? | Codecademy
Basically, my for loop wasn’t acceptable until I changed the starting value from 1 to 0 and the ending value from <= max_value to < max_value. In other words, if we were going to 100, I wanted it to count from 1 to 100, but my code wouldn’t work unless we count from 0 to 99. But why would we start at zero and end early if we’re trying to sum up all the FizzBuzz numbers from 1 to 100?
🌐
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 - Let's see some methods to start a for loop at 1 in Python. range() function allows us to specify a start, stop, and step. By default, it starts at 0 but we can specify 1 as the starting point.
Find elsewhere
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-for-loop-example
Python for loop | DigitalOcean
March 14, 2024 - Here, 100 is the start value, 0 is the stop value, and -10 is the range, so the loop begins at 100 and ends at 0, decreasing by 10 with each iteration. This occurs in the output: ... When programming in Python, for loops often make use of the range() sequence type as its parameters for iteration.
🌐
Python
wiki.python.org › moin › ForLoop
ForLoop - Python Wiki
for x in range(0, 3): print("We're on time %d" % (x)) While loop from 1 to infinity, therefore running forever. x = 1 while True: print("To infinity and beyond! We're getting close, on %d now!" % (x)) x += 1 · When running the above example, you can stop the program by pressing ctrl+c at the same time.
Top answer
1 of 3
10

You can start a loop at whatever you want. The reason you see loops starting at zero often, is because they are looping through an array. Since the first item in an array is at index '0', it makes sense to start looping from 0 to access every item in an array.

2 of 3
2

You should use i = 0 in situations where iterating starting at zero would be natural, as previously stated this could include array indexing or similar. Personally I would say I use this style at least 90% of the time, as when modelling problems in the computer we mold them to use built in data structures, which usually start at 0. Our minds become use to working in this style.

Starting at i = 1 is more natural for modeling many problems while designing algorithms. For example, if you are given a problem such as person 1 is x years old, person 2 is y years old, and so on, indexing using the given numbers may make it easier to give an answer if asked something such as who is the youngest person in the list. Experience and experimentation will teach you if this is worthwhile, in my experience, this can be helpful in things such as programming competitions (like the ICPC), where algorithms must be developed quickly with not much time for debugging, and the algorithms can be very complex, so the clarity is important.

In other words it may be beneficial to waste this first index if it adds clarity, however experienced programmers quickly learn to understand both styles.

However, if you start at zero, remember to be aware that the arrays still start at zero, and you will need an n + 1 size array to represent n elements if you use indexing starting at 1.

Also be aware of your conditional in the for loop.

for (int i = 0; i < 10; i++) - Will loop 10 times

for (int i = 1; i <= 10; i++) - Will loop 10 times

It is basic, but a common source of errors that may be hard to track down, especially for beginning programmers.

🌐
Free Outlook
web.nutritionjobs.com › home › news › python `for` loop: start `range()` from 1
Python `for` Loop: Start `range()` From 1
January 6, 2026 - In its simplest form, range(stop) generates a sequence of numbers starting from 0 up to (but not including) stop. So, range(5) gives you 0, 1, 2, 3, 4. That’s why your loops typically start at zero unless you tell them otherwise.
🌐
freeCodeCamp
freecodecamp.org › news › python-for-loop-for-i-in-range-example
Python For Loop - For i in Range Example
March 30, 2021 - Additional information can be found in Python's documentation for the range() function. ... The start argument is the first value in the range. If range() is called with only one argument, then Python assumes start = 0.
🌐
iO Flood
ioflood.com › blog › python-for-loop-with-index
Learn Python: For Loops With Index (With Examples)
June 7, 2024 - It’s important to note that the index it provides is zero-based, which means it starts counting from 0. If you’re not careful, this can lead to off-by-one errors. We’ll cover how to handle these potential pitfalls in the troubleshooting ...
🌐
W3Schools
w3schools.com › python › python_lists_loop.asp
Python - Loop Lists
Use the len() function to determine the length of the list, then start at 0 and loop your way through the list items by referring to their indexes. Remember to increase the index by 1 after each iteration.