I have a bytes object, for instance
test = b'\x83\xf8\x41\x41\x41' I would like to print this object to stdout, but if I do, Python converts the printable characters in the object to ASCII:
print(test) b'\x83\xf8AAA' Is there a way to force Python 3 to print the printable characters (in this instance, three 'A's) as escaped bytes?
That is, so that print(test) outputs
b'\x83\xf8\x41\x41\x41'