title: How to convert straight quotes to curly quotes in python?
body: <p>I have to replace all of the straight quotation marks (<code>&quot;</code>) to curly ones (<code>“</code> or <code>”</code>)</p>
  <p>I used <code>s.replace</code> to replace all of the straight quotes with curly ones, however, they are all in the same direction. I don't know how to have curly quotes going in one direction when in front of a word, and ones going in the opposite direction at the end.</p>
  <p>Ex: <code>'&quot; &quot;o&quot; &quot;i&quot; &quot;'</code> must be converted to <code>'“ “o” “i” ”'</code></p>