I want a program in python that can get a list of all of the programs running, like all the .exe's, and I want to be able to get them into a variable or array so that I can maybe use a for loop to go through them and filter ones to be shut-down, this is what I've got below to try and get the tasklist using the tasklist command in python, any ideas on how to get all of the task names that the command prompt gives me into an array or variable
import os
def shut():
return(os.system('tasklist'))
print(shut())