How to stop an infinite loop safely in Python?


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

Updated on: 30-Jul-2019

251 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements