The number 64
in hex (base 16) is 100
. To achieve you answer, you should use a combination of hex(), int() and str()
If you start with s = 64
and you want to end up with s = 100
which is the decimal value of 0x64
, consider this code:
s = 64
s = int(str(s), 16)
If you want something else, please clarify what, and note that you can try to achieve it yourself with some combination of hex(), int() and str()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…