Hello all. I apologize in advanced if this has been asked before but I have not been able to find this information via google or searching here. Everything I found is related to how a for loop works. I know how to use a for loop in python and what my input will do and what the output will be. My question is more related to how the syntax itself actually works:
I have the very basic example:
for i in range(10):
print i
I know that this will print 0 through 9 one at a time and that is the expected output and why it starts at 0 and not 1 and why it ends at 9. My question is more related to how the interpreter knows that "i" is meant for iteration (since I can technically use whatever variable I want) when "i" has no declared value and I never declare i++ or i.next