I have a list e.g
['abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba']
and
list(map(set, x))
out:
[{'a', 'b', 'c'},
{'a', 'b', 'c'},
{'a', 'b', 'c'},
{'f', 'o'},
{'a', 'b', 'c'},
{'a', 'b', 'c'},
{'a', 'b', 'c'}]
I would like to receive a set from the set I mean. Expected output:
[ {'a', 'b', 'c'},
{'f', 'o'}]
My second question. How to get a dictionary of counts?
{{'a', 'b', 'c'} : 6,
{'f', 'o'} : 1}}