How to replace " (double quote) with space or remove space?
<p>It's a very simple and basic question that remove double quotes in python, I couldn't get it.</p>

<pre><code>print text
"'abc' : 'xyz'"
</code></pre>

<p>I want it to display as below</p>

<pre><code>'abc' : 'xyz'
</code></pre>

<p>tried many ways but didn't get the required way</p>

<pre><code>text.replace("\""," "); # but it display as it is.
</code></pre>

<p>Could someone tell me to correct syntax?</p>

<p>There's even better <code>str</code> method for this:</p>

<pre><code>&gt;&gt;&gt; print text.strip('"')
</code></pre>

<p>Or, if you want to make <code>strip</code> effect permanent:</p>

<pre><code>&gt;&gt;&gt; text = text.strip('"')
&gt;&gt;&gt; print text
</code></pre>

python python-2.7