SyntaxFix
Write A Post
Hire A Developer
Questions
A simple way to terminate a Python script early is to use the built-in quit() function. There is no need to import any library, and it is efficient and simple.
quit()
Example:
#do stuff if this == that: quit()