title: Using struct pack in python
body: <p>I have a number in integer form which I need to convert into 4 bytes and store it in a list . I am trying to use the struct module in python but am unable to get it to work:</p>
  
  <pre><code>struct.pack("i",34);
  </code></pre>
  
  <p>This returns 0 when I am expecting the binary equivalent to be printed.
  Expected Output:</p>
  
  <pre><code>[0x00 0x00 0x00 0x22]
  </code></pre>
  
  <p>But struct.pack is returning empty. What am I doing wrong?</p>