Home  >  Article  >  Backend Development  >  How to stop the infinite loop of python program

How to stop the infinite loop of python program

尚
Original
2019-07-02 10:14:1915977browse

How to stop the infinite loop of python program

1. Open JUPYTER NOTEBOOK and create a new blank PY document.

How to stop the infinite loop of python program

You may not be able to see an infinite loop when it occurs, but you can see it by dragging the scroll bar.

How to stop the infinite loop of python program

At this time, you need to press this small square to stop.

How to stop the infinite loop of python program

2. Open the SHELL of PYTHON.

How to stop the infinite loop of python program

It will be more obvious if there is an infinite loop here, and it will keep scrolling.

How to stop the infinite loop of python program

We need to press CTRL C to terminate.

How to stop the infinite loop of python program

3. If an infinite loop occurs in PYCHARM, it can only be seen below.

How to stop the infinite loop of python program

How to stop the infinite loop of python program

Click the small square on the left, and it will end when it changes from red to colorless.

How to stop the infinite loop of python program

For more Python related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to stop the infinite loop of python program. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn