title: Convert from python struct.pack (big-endian) to list of integers
body: <p>*EDIT: Title is incorrect, Big-Endian should be Little-Endian. Didn't want to change due to solutions provided.</p>
  
  <p>I am trying to convert a string (ex b'\x01\x00\x00\x00' &lt;- 32 bit intger) back to an integer in my C program.</p>
  
  <p>Client (in Python):</p>
  
  <pre><code>example = [1,2,3]
  struct.pack('i'*int(len(example)/4),packed)
  &lt;Send over open socket to server&gt;
  </code></pre>
  
  <p>Server (in C):</p>
  
  <pre><code>char buffer[1024];
  numbytes = recv(sockfd,buffer,1023,0);
  char message[numbytes];
  memcpy(message,buffer,n);
  &lt;If 'message' is sent back, I can unpack on client&gt;
  ??? How to unpack on C then repack to send response to client ???
  </code></pre>
  
  <p>In C, I want to 'unpack' into a array/struct</p>
  
  <p>Thanks!</p>