python2和python3中字符串转16进制

a= '6A0989D1221D3625AAFA86227DFD2350'

在python2中:

a.decode('hex')

在python3

bytes.fromhex(a)

你可能感兴趣的:(python基础)