close program in python code example
Example 1: how to code python to close a program
import sys
sys.exit(0)
Example 2: python close gile
with open(filename) as f:
#use file
#close file
f.close()
import sys
sys.exit(0)
with open(filename) as f:
#use file
#close file
f.close()