Home > Article > Backend Development > How to stop python infinite loop
When we run the code to print the results, the output column keeps working, and the output results go through an infinite loop. What should we do? Let me introduce to you how to stop the python infinite loop?
The termination method in each IDE is slightly different. Here are the termination methods of three different IDEs:
Open JUPYTER NOTEBOOK and create a new blank PY document.
You may not be able to see an infinite loop when it occurs, but you can see it by dragging the scroll bar.
Related recommendations: "Python Video Tutorial"
At this time, you need to press this small square to stop.
Open the SHELL of PYTHON.
It will be more obvious if there is an infinite loop here, and it will keep scrolling.
We need to press CTRL C to terminate.
If an infinite loop occurs in PYCHARM, it can only be seen below.
Click the small square on the left, and it will end when it changes from red to colorless.
The above is the detailed content of How to stop python infinite loop. For more information, please follow other related articles on the PHP Chinese website!