How can i count number of output using python with powershell?

Viewed 25
import subprocess
def run(cmd):
    p = subprocess.run(["powershell","-Command"],shell=true,capture_output=True,text=true)
    output = p.stdout
    print(output)
main():
    run("some-powershell-command")

#now i got the answer say file1,file2,file3 etc.. i need to count this

0 Answers
Related