How to Terminate a Python Script

Posted on July 31, 2019 at 1:07 pm

The simplest way is to use quit(), i.e:

// do something
 
quit()

Another way is to use sys.exit(), i.e:

import sys
sys.exit()

Receive updates via email

Other Posts

Updated Posts