To exit the Python interpreter, you can use one of the following methods:
- Type
exit()orquit()at the>>>prompt and press Enter. - Press Ctrl + D on most systems or Ctrl + Z followed by Enter on Windows.
After exiting, you'll return to your regular terminal prompt.
