title: Is it possible to do bitwise operations on a string in Python?
body: <p>This fails, not surprisingly:</p>
  
  <pre><code>&gt;&gt;&gt; 'abc' &lt;&lt; 8
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unsupported operand type(s) for &lt;&lt;: 'str' and 'int'
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>With ascii <code>abc</code> being equal to <code>011000010110001001100011</code> or <code>6382179</code>, is there a way to shift it some arbitrary amount so <code>'abc' &lt;&lt; 8</code> would be <code>01100001011000100110001100000000</code>?</p>
  
  <p>What about other bitwise operations? <code>'abc' &amp; 63</code> = <code>100011</code> etc?</p>