import os
shutdown = input("Do you want to shutdown your computer (yes / no): ")
if shutdown == 'yes':
os.system("shutdown /s /t 1")
else:
print('Shutdown is not requested')
Python关机代码
最新推荐文章于 2024-04-10 07:30:38 发布
import os
shutdown = input("Do you want to shutdown your computer (yes / no): ")
if shutdown == 'yes':
os.system("shutdown /s /t 1")
else:
print('Shutdown is not requested')