kill program python code example
Example 1: python exit program
import sys
sys.exit()
Example 2: how to stop running code in python
#to stop all execution of code
exit()
Example 3: kill python
pkill -9 python
import sys
sys.exit()
#to stop all execution of code
exit()
pkill -9 python