title: pointer typecasting like c in python
body: <p>I've a c code to type cast a string to an integer via pointer.</p>
  
  <pre><code>char s[]="efgh";
  int * p;
  p=(int *) s;
  printf("%d",*p);
  </code></pre>
  
  <p>This gives me an output of:</p>
  
  <pre><code>1751606885
  </code></pre>
  
  <p>Which is a 32 bit integer.</p>
  
  <p>I'm analyzing a network packet in python and need the above functionality in python. 
  I've a string</p>
  
  <pre><code>s="efgh"
  </code></pre>
  
  <p>and want the above in a 32 bit integer (from the byte level).</p>
  
  <p>How can I do it?</p>