how to kill a python program in terminal code example Example: python kill script import sys sys.exit()