#Hex -> Bytes >>> b'xdexadxbexef'.hex() 'deadbeef' #Bytes -> Hex >>> bytes.fromhex('deadbeef') b'xdexadxbexef'