how to rid "" from a string to non string
<p>I have this</p>

<pre><code>a = "'Something': False"
</code></pre>

<p>I want it to be this</p>

<pre><code>a = 'Something': False
</code></pre>

<p>How do I do it? I can strip things within the double quotation marks, but not the quotation marks itself. Have researched, cant find. I have mind block at moment. Sorry</p>

<p>Im trying to do this:</p>

<pre><code>query_results = UserProfile.objects.filter(Location: location, Gender: gender).extra(select={'rank': a &gt; 0}, order_by=['-rank'])
</code></pre>

<p>where Location = Someplace and Gender = Male or Female.</p>

<p>But what about when i did not want a specific gender or location. The only thing i could think of to do  was to do </p>

<pre><code>Location__isnull:False,  Gender__isnull:False
</code></pre>

<p>But i cant have both</p>

<pre><code>Location:location, Location__isnull:False.
</code></pre>

<p>Thus i have to have the location argument as a variable.</p>

<p>How could i then do this. The information referring to Location and gender is coming from a request.GET</p>

<p>I cant post my code as i keep deleting and changing spaghetti to try make something edible.</p>
