擅长:python、mysql、java
<p>我将使用<a href="https://docs.python.org/3/library/struct.html" rel="nofollow noreferrer">python struct</a>以不同的方式解释位。在</p>
<p>类似下面这样的方法将-12打印为无符号整数</p>
<pre><code>import struct
p = struct.pack("@i", -12)
print("{}".format(struct.unpack("@I",p)[0]))
</code></pre>