Sometimes, we want to terminate a script with Python.
In this article, we’ll look at how to terminate a script with Python.
How to terminate a script with Python?
To terminate a script with Python, we can use the sys.exit
method.
For instance, we write:
import sys
sys.exit()
to exit the script.
Conclusion
To terminate a script with Python, we can use the sys.exit
method.