Links: PYTHON - PROGRAMMING
Rel:
Ref: python standard library; builtins; commands
Tags: #public


exit() - leave the Python interpreter, return to shell

% 
% python3
Python 3.9.1 (default, Feb  3 2021, 07:38:02) 
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> exit()
% 

exit - close the current shell session

 % exit
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...       8 completed.

[Process completed]