Str to hex in Python
<p>I receive on my socket a 4 bytes value that I want to print as hex value. I am trying:</p>

<pre><code> print "%08x" % (nonce)
</code></pre>

<p>However, I get an error message that string can't be converted to hex. Anyone an idea
how this could be quickly resolved?</p>
