The docs say that calling sys.exit() raises a SystemExit exception which can be caught in outer levels. I have a situation in which I want to definitively and unquestionabl
You can also use quit, see example below:
while True: print('Type exit to exit.') response = input() if response == 'exit': quit(0) print('You typed ' + response + '.')