How to convert frozenset to normal sets or list?
<p>For example, I have a frozen set</p>

<pre><code>[frozenset({'a', 'c,'}), frozenset({'h,', 'a,'})]
</code></pre>

<p>I want to convert it to a normal list like</p>

<pre><code>[['a', 'c,'],['a,', 'd,']...]
</code></pre>

<p>What method should I use?</p>

<pre><code>sets=[frozenset({'a', 'c,'}), frozenset({'h,', 'a,'})]

print([list(x) for x in sets])
</code></pre>

<p>The list comprehension will convert every frozenset in your list of sets and put them into a new list. That's probably what you want.</p>

<p>You can also you map, <code>map(list, sets)</code>. Please be aware, that in Python 3, if you want the result of <code>map</code> as list you need to manually convert it using <code>list</code>, otherwise, it's just a <code>map object</code> which looks like <code>&lt;map object 0xblahblah&gt;</code></p>

python python-3.x