Убить систему ОС по сценарию Pid Python
processList = (process for process in psutil.process_iter() if process.name()=="chrome.exe")
totalProcess = sum(1 for x in processList)
print(totalProcess)
processList = (process for process in psutil.process_iter() if process.name()=="chrome.exe")
for (i, x) in enumerate(processList):
print(x)
if (i > 1 and i <= 3):
os.kill(x.pid, 9)
print(i)
print(x)
Lokesh003