title: How do I send input to and get output from bc using Python?
body: <p>I can run bc with Python with the following code:</p>
  
  <pre><code>subprocess.Popen("bc", stdout=subprocess.PIPE).communicate()[0]
  </code></pre>
  
  <p>However, this only launches bc, and I have to manually input whatever I want, for example, 1+1. I want to use Python to send 1+1 to bc and get the output. How would I do that?</p>