title: Create Python bytecode from list of opcodes and arguments?
body: <p>Is there an easy way to create Python bytecode from a list of 2-tuples with opcodes and their arguments?</p>
  
  <p>For instance:</p>
  
  <pre><code>&gt;&gt;&gt; bytecode_compile([
          ('LOAD_CONST', 2),
          ('STORE_FAST', 'a'),
          ('LOAD_FAST', 'a'),
          ('RETURN_VALUE',)])
  'd\x01\x00}\x00\x00|\x00\x00S'
  </code></pre>