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