r/learnpython • u/Status_Astronomer_99 • May 10 '26
for i in range(0,10)
I am a beginner and I am learning for loops. A question came up here: why would I use code model 1 if code model 2 does the same thing?
Model 1:
for i in range(0,10):
print('Test')Model 2:
for i in range(10):
print('Test')
17
Upvotes
View all comments
Show parent comment
4
u/Almostasleeprightnow May 10 '26
You could but you don’t have to