How to terminate a program in Python
In this article, we will learn to terminate a program in python
To stop a running program, use
Ctrl+C to terminate the process.
To handle it programmatically in python, import the
sys module and use
sys.exit() where you want to terminate the program.
import sys sys.exit()
Please login to comment
View all comments