The quit() function is an in-built command to exit a Python program by closing the Python file.
Additionally, the exit() method is a popular and preferred method to terminate a program in Python.
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.
See more results on Neeva
Summaries from the best pages on the web
To stop code execution in Python you first need to import the sys object. After this you can then call the exit() method to stop the program running. It is the ...
Stopping Code Execution In Python | #! code
The first Python command to exit program we’ll discuss is quit(). Python’s in-built quit() function exits a Python program by closing the Python file.
Python Exit commands | Interviewkickstart
exit() method is the most popular and the most preferred method to terminate a program in Python.
If Python program is running in cosole, then pressing CTRL + C on windows and CTRL + Z on unix will raise KeyboardInterrupt exception in the main thread.
6 ways to exit program in Python - Java2Blog