Convert to Dictionary Values that Contains a Set to a List
<p>I am trying to convert a set inside a list like</p>

<pre><code>x = [set(['Halo', 'Bye'])]
</code></pre>

<p>into a list:</p>

<pre><code>['Halo', 'Bye']
</code></pre>

<p>However when I typed list(x), the result still shows</p>

<pre><code>[set(['Halo', 'Bye'])]
</code></pre>

<p>Is there a way to do this?</p>

<p>I have been looking at various Stackoverflow resources like <a href="http://stackoverflow.com/questions/6593979/how-to-convert-a-set-to-a-list-in-python">this</a> and <a href="http://stackoverflow.com/questions/6828722/python-set-to-list">this</a> for a solution but nothing works.</p>

<p><code>x</code> is a list already, but the set you that are trying to convert is an element of the list <code>x</code>.<br>So, do:</p>

<pre><code>print (list(x[0]))
</code></pre>

<p>instead of just <code>list(x)</code> as the set is the first and the only element in the list <code>x</code>.</p>

python list set