擅长:python、mysql、java
<p>试试这个</p>
<pre><code>def print_me(thing: bytes):
print(''.join(
f'\\x{byte:02x}'
for byte in thing
))
print_me(bytes.fromhex("0106000600000AE9CC"))
</code></pre>
<p>输出:</p>
<pre><code>\x01\x06\x00\x06\x00\x00\x0a\xe9\xcc
</code></pre>