Converting String of Tuple into Tuple
<p>How to convert a string in Python into a Tuple without splitting the words into characters?</p>

<p>String: <code>"('name','value')"</code></p>

<p>Expected Output: <code>('name', 'value')</code></p>

<p>you can use module <code>ast</code></p>

<pre><code>&gt;&gt;&gt; a = "('name','value')"
&gt;&gt;&gt; import ast
&gt;&gt;&gt; ast.literal_eval(a)
('name', 'value')
</code></pre>

python