擅长:python、mysql、java
<blockquote>
<p>I want this because I need to convert hh in every \xhh into int
number.</p>
</blockquote>
<pre><code>In [17]: s = "\x00\x12\xf8\x05\x74\xa2"
In [18]: list(bytearray(s))
Out[18]: [0, 18, 248, 5, 116, 162]
</code></pre>
<p>您可能会对bytearray的用法感兴趣。在</p>