Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created July 31, 2018 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/7cac5cd2dd7ca00732d6a4b3ecbe568d to your computer and use it in GitHub Desktop.
Save Fhernd/7cac5cd2dd7ca00732d6a4b3ecbe568d to your computer and use it in GitHub Desktop.
Decodificar y codificar hexadecimales. OrtizOL.
import binascii
cadena = b'Python'
# Representación en hexadecimal:
hexadecimal = binascii.b2a_hex(cadena)
print(hexadecimal)
# Representación en bytes:
print(binascii.a2b_hex(hexadecimal))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment