how to exit python code inside function code example Example: exit python script import sys sys.exit()