Python:如何将16进制与10进制的相互转换
16进制转10进制:
eg:
time.strftime("%m%d").encode(‘GBK’).hex()
16进制转10进制:
eg:
a = b’e112353037303237313934363639363934393736’
content = a[4:]
print(content)
import binascii
print(binascii.a2b_hex(content))
Python:如何将16进制与10进制的相互转换
16进制转10进制:
eg:
time.strftime("%m%d").encode(‘GBK’).hex()
16进制转10进制:
eg:
a = b’e112353037303237313934363639363934393736’
content = a[4:]
print(content)
import binascii
print(binascii.a2b_hex(content))