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