>>> from hexbytes import HexBytes
>>> ...
>>> hb
HexBytes('0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178')
I have a HexBytes object hb
.
I want to get 0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178
string, what should I do?
>>> from hexbytes import HexBytes
>>> ...
>>> hb
HexBytes('0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178')
I have a HexBytes object hb
.
I want to get 0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178
string, what should I do?
never worked with this module but this should do the job:
hexdecimal = "".join(["{:02X}".format(b) for b in hb])