Python3
$ python3 --version
Python 3.10.5
Bytes -> HEX String
b = b'abc\n'
s = b.hex()
print(f'{b=}, {s=}')
b=b'abc\n', s='6162630a'
HEX String -> Bytes
s = '782079207a0a'
b = bytes.fromhex(s)
print(f'{s=}, {b=}')
s='782079207a0a', b=b'x y z\n'