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