title: Convert binary string to bytearray in Python 3
body: <p>Despite the many related questions, I can't find any that match my problem.  I'd like to change a binary string (for example, <code>"0110100001101001"</code>) into a byte array (same example, <code>b"hi"</code>).</p>
  
  <p>I tried this:  </p>
  
  <pre><code>bytes([int(i) for i in "0110100001101001"])
  </code></pre>
  
  <p>but I got:</p>
  
  <pre><code>b'\x00\x01\x01\x00\x01' #... and so on
  </code></pre>
  
  <p>What's the correct way to do this in Python 3?</p>