title: Python - Assign function to a variable
body: <p>I use the module <strong>subprocess</strong> to show status of firewall :</p>
  
  <pre><code>subprocess.check_call('netsh advfirewall show allprofiles state')
  </code></pre>
  
  <p>But it always show the output to screen like this :</p>
  
  <pre><code>Domain Profile Settings: 
  ----------------------------------------------------------------------
  State                                 ON
  Private Profile Settings: 
  ----------------------------------------------------------------------
  State                                 ON
  Public Profile Settings: 
  ----------------------------------------------------------------------
  State                                 ON
  </code></pre>
  
  <p>I just one to assign it to a variable to get only "ON" or "OFF" status of Firewall.</p>
  
  <p>I try all the way i know but it not working.</p>