I apologize in advance as this is going to be a vague question. I just hope someone has the same experience and can help me. Imagine a simple script that has this simple code in it:
for i in range(100):
print(i)
When I run the script from the terminal (CMD), occasionally, the loop gets stuck but as soon as I press the Enter key in the terminal, it jumps back into working and the loop continues. I want to emphasize that there is nothing like a user input line in the code causing a pause in the loop until a key is pressed or anything like that in the code. Also, this never happens if I run the code inside an IDE. This only happens in CMD and in possibly in any script that has a loop like this.
>Solution :
When you click on the command prompt it goes into select mode, you will see a white square. You will also see at the top of the command prompt it will say select. This will pause anything running in the cmd.
If you press enter that will get it out of select mode and will continue running the program
I believe this is what your running into.

