this is
for
loop, not while
loop. There is no condition to check and decide to continue or not the loop, i.e. the value of i is irrelevant if there will be next iteration or not. you are free to use/assign new value to i
in the loop body, e.g.for i in range(3): i *= 2 print(i)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs