[Solved] Why doesn’t this python code run infinite times? [closed]
It has to do with how the program source code is interpreted. range(a) will be executed before the body of the loop, producing an iterable object which yields 3, 4, 5. a will be modified later but it will not affect range(a) cause it has already been executed. The following will do what you want, … Read more