store output of command in variable python code example
Example: python get output of command to variable
import subprocess as sp
output = sp.getoutput('whoami --version')
print (output)
import subprocess as sp
output = sp.getoutput('whoami --version')
print (output)