try:x="blaabla"y="nnlfa" if x!=y:sys.exit()else:print("Error!")
except Exception:print(Exception)
I'm not asking about why it is throwing an error. I know that it raises exceptions.SystemExit
. I was wondering if there was another way to exit?
try:x="blaabla"y="nnlfa" if x!=y:sys.exit()else:print("Error!")
except Exception:print(Exception)
I'm not asking about why it is throwing an error. I know that it raises exceptions.SystemExit
. I was wondering if there was another way to exit?
os._exit()
will do a low level process exit without SystemExit
or normal python exit processing.