title: output of os.system in variable python
body: <p>I am making a server that asks for you IP address and I want to make an option that says <code>(leave blank for __your ip__)</code> but I'm having trouble with it. I tried doing this</p>
  <pre><code>import subprocess
  output = subprocess.check_output(&quot;ipconfig getifaddr en0&quot;, shell=True)
  </code></pre>
  <p>but it returns
  <code>b'***.***.***.***\n'</code> is there a way to remove the '', b and \n or another way to get an IP that doesn't return <code>127.0.0.1</code>?</p>