how to close the program in python code example
Example 1: how to code python to close a program
import sys
sys.exit(0)
Example 2: how to stop running code in python
#to stop all execution of code
exit()
import sys
sys.exit(0)
#to stop all execution of code
exit()