Logo

Programming-Idioms

History of Idiom 175 > diff from v9 to v10

Edit summary for version 10 by programming-idioms.org:
[Python] +DocURL (for python 3)

Version 9

2019-03-19, 16:38:41

Version 10

2019-03-26, 21:24:42

Idiom #175 Bytes to hex string

From array a of n bytes, build the equivalent hex string s of 2n digits.
Each byte (256 possible values) is encoded as two hexadecimal characters (16 possible values per digit).

Idiom #175 Bytes to hex string

From array a of n bytes, build the equivalent hex string s of 2n digits.
Each byte (256 possible values) is encoded as two hexadecimal characters (16 possible values per digit).

Extra Keywords
hexa
Extra Keywords
hexa
Code
s = a.hex()
Code
s = a.hex()
Doc URL
https://docs.python.org/3/library/stdtypes.html#bytearray.hex