__builtin__.bytearray.fromhex

bytearray.fromhex(string) → bytearray

Create a bytearray object from a string of hexadecimal numbers. Spaces between two numbers are accepted. Example: bytearray.fromhex(‘B9 01EF’) -> bytearray(b’xb9x01xef’).