That is the repr of the value you are seeing.
Try both these to see the difference:
x = ‘a#b'.translate(str.maketrans({'#': r'\#'}))
print(x)
print(repr(x))
That is the repr of the value you are seeing.
Try both these to see the difference:
x = ‘a#b'.translate(str.maketrans({'#': r'\#'}))
print(x)
print(repr(x))