decode hex to string python code example
Example 1: hex to string python
>>> b'\xde\xad\xbe\xef'.hex()
'deadbeef'
Example 2: hex to string python
>>> bytes.fromhex('deadbeef')
b'\xde\xad\xbe\xef'
>>> b'\xde\xad\xbe\xef'.hex()
'deadbeef'
>>> bytes.fromhex('deadbeef')
b'\xde\xad\xbe\xef'