Heres the scenario I have a password that must be entered if entered wrong the script will not proceed and just exit itself? But how can I tell the script to safely exit itself?
I tried sys.exit() but that gives a traceback error and doesn't seem like a very clean exit method.
NameError: global name 'sys' is not defined? Callingsys.exit()exits cleanly for me.try: except: pass(which is bad practice anyways) where it will fail to exit the program.sys.exitis a<built-in function exit>, butexitis a<class 'site.Quitter'>object.