Do Not Use exit() in IPython

 

Do not use exit() in any IPython script (Jupyter Notebook, etc). The kernel will be trapped in a die-restart loop with the following error information:

The kernel appears to have died. It will restart automatically.