how to stop python program execution code example
Example 1: python sys halt
import sys
#put your code here
sys.exit
Example 2: how to exit program in python
import sys sys.exit() //This will exit the python program
import sys
#put your code here
sys.exit
import sys sys.exit() //This will exit the python program