How to create python bytes object from long hex string? December 22, 2022 by Tarik result = bytes.fromhex(some_hex_string)