title: Python 3.6 Bitwise operations on byte datatype (>>, <<, |, & ) throws error:
body: <p>I am a beginner and I am trying to perform bit wise operations on an element from 'byte' array</p>
  
  <p>Example code: </p>
  
  <pre><code>step1_result[i] = (bytes((seedrandom[i] &gt;&gt; 3)) | bytes((seedrandom[i] &lt;&lt; 5)))
  </code></pre>
  
  <pre><code>&gt;&gt;&gt; TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes'
  </code></pre>
  
  <p><code>step1_result</code> and <code>seedrandom</code> is a list with 'byte' type elements</p>
  
  <p>Is there a specific method to apply bitwise operations on a byte in Python?</p>