I have a string stored in a database- "hello there, user "X", please help me solve this issue"
I have written an API to fetch the this entry.
Now, I want to escape the double quotes around the letter X to perform some string formatting in python. Is there a way to write a code in python which adds the backslash before the double quotes? I have tried using replace function, it will give invalid syntax. I just cannot use any function to escape it as it gives invalid syntax anyway. Check the image attached for reference.