Summary
The quit() function is an in-built command to exit a Python program by closing the Python file.
1
Additionally, the exit() method is a popular and preferred method to terminate a program in Python.
2
If the program is running in the console, pressing CTRL + C on Windows and CTRL + Z on Unix will raise a KeyboardInterrupt exception in the main thread.
2
According to