python shutdown program code example
Example 1: how to shutdown a computer with python
import os
os.system("shutdown /s /t 1")
Example 2: how to code python to close a program
import sys
sys.exit(0)
Example 3: how to shutdown a windows 10 computer using python
import os
os.system("shutdown /s /t 1")