title: Convert list of ASCII codes to string (byte array) in Python
body: <p>I have a list of integer ASCII values that I need to transform into a string (binary) to use as the key for a crypto operation. (I am re-implementing java crypto code in python)</p>
  
  <p>This works (assuming an 8-byte key):</p>
  
  <pre><code>key = struct.pack('BBBBBBBB', 17, 24, 121, 1, 12, 222, 34, 76)
  </code></pre>
  
  <p>However, I would prefer to not have the key length and unpack() parameter list hardcoded.</p>
  
  <p>How might I implement this correctly, given an initial list of integers?</p>
  
  <p>Thanks!</p>