from my example in the other thread
spam = bytearray(b'0P\x14}\x04\xf8\xff3') data = [f"{byte:02x}" for byte in spam] print(data) data = [int(f"{byte:02x}", base=16) for byte in spam] print(data)data is list of string
Output:['30', '50', '14', '7d', '04', 'f8', 'ff', '33']
[48, 80, 20, 125, 4, 248, 255, 51]
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs