Skip to content
Advertisement

convert byte to string represented with backslahes in python

I have a python byte object like

JavaScript

I want to convert to string like

JavaScript

is there any easy way to do this?

Ultimately I have a byte object like

JavaScript

and I want it to have a string with all chars backscaped.

Advertisement

Answer

JavaScript

I guess … i still think you dont actually want to do this …

if its just for readability then this is a good answer

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement