python withdraw from the program

Use sys.exit () to exit the current program execution

import sys

if x==0:
   sys.exit()

 

Guess you like

Origin www.cnblogs.com/imhuanxi/p/11069471.html