def HexToByte(hexStr):
 bytes = []
 hexStr = ''.join(hexStr.split(' '))
 for i in range(0, len(hexStr), 2):
  bytes.append(chr(int(hexStr[i:(i + 2)], 16)))
 return ''.join(bytes)

def HexToByte ( hexStr ) : bytes = [ ] hexStr = '' . join ( hexStr . split ( ' ' ) ) for i in range ( 0 , len ( hexStr ) , 2 ) : bytes . append ( chr ( int ( hexStr [ i : ( i + 2 ) ] , 16 ) ) ) return '' . join ( bytes )
convert a string hex byte values into a byte string .