I am using bytes in python to convert following integers into bytes:
>>> b = bytes([192, 168, 10, 254])
I get the following output: b'\xc0\xa8\n\xfe'
My question, why does the int 10 is represented as \n and not hex value of '0xa'. Looking at the output, 192, 168 and 254 all gets represented as their equilvalent hex values. Why not 10 is represented by its hex value.
Thanks