擅长:python、mysql、java
<p>在python3.2+中,可以使用<code>int.from_bytes()</code>:</p>
<pre><code>>>> int.from_bytes(b'\xb68 \xe9L\xbd\x97\xe0\xd6Q\x91c\t\xc3z\\', byteorder='little')
122926391642694380673571917327050487990
</code></pre>
<p>您也可以使用'big'字节顺序:</p>
^{pr2}$
<p>也可以指定是否要使用two的补码表示法。更多信息:<a href="https://docs.python.org/3/library/stdtypes.html" rel="nofollow">https://docs.python.org/3/library/stdtypes.html</a></p>