I need to store the result of a shell command that I executed in a variable, but I couldn\'t get it working. I tried like:
import os call = os.system(\"
In python 3 you can use
import subprocess as sp output = sp.getoutput('whoami --version') print (output) ``