for i in range(1,5):
print(i)
a = input("Enter a Number")
If I don't Enter anything into the Input and Rerun the File again In VSCODE Terminal, The For loop iteration is advancing.
However I was expecting it to reset back to its initial value of 1. Why is this happening and How do I fix It ?
It might be that you're still running the program on accident. Try clicking the play button in the top right corner and selecting "Run Python File" from the drop down menu. If you want to use the terminal, press ctrl + C to ensure the program stops running, then run your program from the terminal.