title: Represent List as a String with Double-Quotes Instead of Single-Quotes for JSON
body: <p>Input:</p>
  
  <pre><code>mylist = ["a", "b"]
  </code></pre>
  
  <p>I have to output:</p>
  
  <pre><code>'["a", "b"]'
  </code></pre>
  
  <p>But using <code>str(mylist)</code> or <code>'{}'.format(mylist)</code> on the list gets me:</p>
  
  <pre><code>"['a', 'b']"
  </code></pre>
  
  <p>This is for a JSON API, and JSON doesn't accept <code>'</code>.</p>
  
  <p>Looking around, this is indeed stated that <a href="https://stackoverflow.com/questions/10954687/print-empty-string-with-double-quotes-instead-of-single-quotes-in-python">here</a> it doesn't work with format for containers.</p>
  
  <p>Is there still a solution? I'm now using <code>.replace("'", '"')</code> but that really seems silly.</p>