title: Printing out packing result from struct.pack
body: <p>struct.pack returns packed result from input value.</p>
  
  <pre><code>In [19]: pack("i",4)
  Out[19]: '\x04\x00\x00\x00'
  </code></pre>
  
  <p>I'm trying to printout the packed result as follows:</p>
  
  <pre><code>val = pack("i", 4)
  print "%d" % int(val[0])
  </code></pre>
  
  <p>However, I got ValueError:</p>
  
  <pre><code>ValueError: invalid literal for int() with base 10: '\x04'
  </code></pre>
  
  <p>How can I print the packed value?</p>