Heres the python code im having problems with:
for i in range (0,10): if i==5: i+=3 print i
I expected the output to be:
Python's for loop simply loops over the provided sequence of values — think of it as "foreach". For this reason, modifying the variable has no effect on loop execution.
for
This is well described in the tutorial.