shutdown command python code example Example: how to shutdown a computer with python Click to copyimport os os.system("shutdown /s /t 1")