I have a string that after print is like this: \x4d\xff\xfd\x00\x02\x8f\x0e\x80\x66\x48\x71
But I want to change this string to "\x4d\xff\xfd\x00\x02\x8f\x0e\x80\x66\x48\x71"
which is not printable (it is necessary to write to serial port). I know that it ist problem with '\
'. how can I replace this printable backslashes to unprintable?