command to kill python script code example
Example 1: python kill script
import sys
sys.exit()
Example 2: linux kill python
ps -elf | grep python
kill -9 <whatever_the_PID_is>
import sys
sys.exit()
ps -elf | grep python
kill -9 <whatever_the_PID_is>