Created
July 31, 2018 13:31
-
-
Save Fhernd/7cac5cd2dd7ca00732d6a4b3ecbe568d to your computer and use it in GitHub Desktop.
Decodificar y codificar hexadecimales. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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