how to exit the code after the code run python code example Example: exit python script import sys sys.exit()