Advertisement
Fhernd

decodificar-codificar-hexadecimal.py

Jul 31st, 2018
2,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. import binascii
  2.  
  3. cadena = b'Python'
  4.  
  5. # Representación en hexadecimal:
  6. hexadecimal = binascii.b2a_hex(cadena)
  7. print(hexadecimal)
  8.  
  9. # Representación en bytes:
  10. print(binascii.a2b_hex(hexadecimal))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement