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.

Answer from Aksel on Stack Exchange
๐ŸŒ
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

Is it necessary to start variable from zero (var i = 0 ) of ' for loop '?
Is it necessary to start variable from zero (var i = 0) of any looping ? When should I use var i = 1; and when var i =0;? More on softwareengineering.stackexchange.com
๐ŸŒ softwareengineering.stackexchange.com
June 9, 2014
Python for loop start counter initialization - Stack Overflow
index is being reassigned anyway within the for-loop so index = iteration + 1 is not having any effect. ... list is not a keyword. It's a builtin identifier; reassigning it is valid, but generally a bad idea. 2013-07-06T00:29:18.94Z+00:00 ... I'd upvote TerryA's answer. However I like to improve his answer to meet OP request and make it conform to Python3... 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
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. The exception will be for the first zero met, I need j... 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
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.

๐ŸŒ
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
Find elsewhere
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
Codecademy
codecademy.com โ€บ forum_questions โ€บ 4f52839209a70f0003014446
2.4: Why does the loop start at 0 and not 1? | Codecademy
getFizzBuzzSum: function(number) ... both . . . }, ... Fair enough. Do you still have to start at zero? ... Yes, because you want to loop 100 times. That is, 0 through 99....
๐ŸŒ
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 - In this code snippet, enumerate(my_list, start=1) starts the index at 1 instead of the default 0. This means that as you iterate through my_list, the index will begin counting from 1, which can be particularly useful for displaying results in ...
๐ŸŒ
Berkeley
pythonnumericalmethods.studentorg.berkeley.edu โ€บ notebooks โ€บ chapter05.01-For-Loops.html
For-Loops โ€” Python Numerical Methods
First, the function range(1, 4) ... a very simple form, it is range(start, stop, step), and the step is optional with 1 as the default. The variable n is assigned the value 0....
๐ŸŒ
Quora
quora.com โ€บ Why-do-you-use-I-0-in-while-loops
Why do you use I=0 in while loops? - Quora
... Both loops iterate ten times - the first one counts from 0 to 9 (inclusively) - the second goes from 1 to 10 (inclusively). Most programmers will start from zero - somewhat from habit and somewhat because one so often wants to use the loop ...
๐ŸŒ
Real Python
realpython.com โ€บ python-for-loop
Python for Loops: The Pythonic Way โ€“ Real Python
February 23, 2026 - In this example, instead of using enumerate() to produce zero-based indices, you start the count at 1. From the end userโ€™s perspective, starting the menu at 1 is the natural way to go. Looping through two or more iterables in parallel may be another common task you encounter in Python programming. To do this, you can use the built-in zip() function, which takes two or more iterables and yields tuples that combine items from each iterable.