title: replace double quotes with '\"' in python
body: <p>I have a string - </p>
  
  <pre><code>l = '{"a": "1", "b": "2"}'
  </code></pre>
  
  <p>I want to convert this string to - </p>
  
  <pre><code>'{\"a\": \"1\", \"b\": \"2\"}'
  </code></pre>
  
  <p>For this I am trying to replace " with \"</p>
  
  <p>Here's what I have tried -</p>
  
  <pre><code>l.replace('\"', '\"')
  '{"a": "1", "b": "2"}' 
  
  l.replace('\"', '\\"')
  '{\\"a\\": \\"1\\", \\"b\\": \\"2\\"}'
  </code></pre>
  
  <p>How do I convert <code>{\"a\": \"1\", \"b\": \"2\"}</code>?</p>