python stop program# code example
Example 1: python stop script
some code
quit() # quit at this point
some more code (that's not executed)
Example 2: stop program python
# Do stuff
stop = input("Would you like to stop the program? ")
if stop == "y":
exit()
else:
# do stuff