how to convert hex to string python code example
Example 1: hex to string python
>>> bytes.fromhex('HexValue').decode('utf-8')
'string'
>>> bytes.fromhex('7368616b6564').decode('utf-8')
'shaked'
Example 2: python hex to bytes string
hexadecimal_string = "AB"
byte_array = bytearray.fromhex(hexadecimal_string)
print(byte_array)
Example 3: hex to string python
>>> b'\xde\xad\xbe\xef'.hex()
'deadbeef'