Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Decoding a hex string
>>> bytes.fromhex('ab')
b'\xab'
>>> import binascii
>>> binascii.unhexlify('ab')
b'\xab'
>>> import codecs
>>> codecs.decode('ab', 'hex')
b'\xab'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.