Logo

Programming-Idioms

History of Idiom 176 > diff from v7 to v8

Edit summary for version 8 by Oldboy:
New Python implementation by user [Oldboy]

Version 7

2019-01-24, 13:45:08

Version 8

2019-02-11, 20:01:36

Idiom #176 Hex string to byte array

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

Idiom #176 Hex string to byte array

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

Extra Keywords
hexa
Extra Keywords
hexa
Code
a = bytearray.fromhex(s)