Using bytes.fromhex method, we can convert hex string to bytes string.
bytes.fromhex
hex_str = "48656c6c6f20576f726c64" bytes.fromhex(hex_str) # b'Hello World'