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>

<pre><code>[item for set_ in x for item in set_]
</code></pre>

<p>This will flatten a list of sets (or a list of lists) into just a list</p>

python list set