Pythonista has Published 22 Articles

How to stop an infinite loop safely in Python?

Pythonista

Pythonista

Updated on 30-Jul-2019 22:30:21

381 Views

Infinite loop is the one that doesn't stop on its own. It happens when the looping condition continues to remain true forever. In such a case, the loop must be forcibly stopped by pressing ctrl-C to generate keyboard interrupt

How we can come out of an infinite loop in Python?

Pythonista

Pythonista

Updated on 30-Jul-2019 22:30:21

316 Views

A loop is said to be an infinite loop when it doesn't stop on its own. It needs to be forcibly stopped by pressing ctrl-C to generate keyboard interrupt.

Advertisements