I need to create a file which contains only hex data.
Suppose I have an integer value 10, I want hexadecimal 'a' the value written to the file. The file should have only 1 byte size.
I tried the format, binascci.hexlify
etc but it is not giving the correct solution. If I directly use hex(10), it will add 0x to the file.
If I write 25, the file will contain two characters 1 and 9 (25(dec) = 19(hex))
Kindly let me know the correct mechanism.