title: Assign output of os.system to a variable and prevent it from being displayed on the screen
body: <p>I want to assign the output of a command I run using <code>os.system</code> to a variable and prevent it from being output to the screen. But, in the below code ,the output is sent to the screen and the value printed for <code>var</code> is 0, which I guess signifies whether the command ran successfully or not. Is there any way to assign the command output to the variable and also stop it from being displayed on the screen?</p>
  
  <pre><code>var = os.system("cat /etc/services")
  print var #Prints 0
  </code></pre>