binaryValue= '000000000000000011110011'
I want to segregate 8 characters and convert that 8 bits to hexadecimal format as the above will have a value of '0x000x000xf3'
.
I want this value to be printed via python as '\x00\x00\xf3'
. Please let me know how to achieve this using python. And please let me know what will happen if there is '\n'
after every binaryValue string at the end of it. How to achieve this also.