I have a long string with hexadecimal characters.
For example:
string = "AA55CC3301AA55CC330F234567"
I am using the
string.to_bytes(4, 'little')
I would like the final string to be as follow:
6745230F33CC55AA0133CC55AA
but I am getting an error
AttributeError: 'str' object has no attribute 'to_bytes'
What's wrong here?