在Python 3中,我们使用
bytes对象,
str在Python 2中也称为。
# Python 3key = bytes([0x13, 0x00, 0x00, 0x00, 0x08, 0x00])# Python 2key = ''.join(chr(x) for x in [0x13, 0x00, 0x00, 0x00, 0x08, 0x00])
我发现使用该
base64模块更方便…
# Python 3key = base64.b16depre(b'130000000800')# Python 2key = base64.b16depre('130000000800')您还可以使用文字…
# Python 3key = b'x13 x08 '# Python 2key = 'x13 x08 '



