Can I reverse a Counter into a list of lists without multiples?

Viewed 212

Using the Collection Counter,

l1 = ['a', 'b', 'b', 'c', 'c', 'b', 'e']
l2 = ['a', 'b', 'b', 'c', 'c', 'b','d']

from collections import Counter

c1 = Counter(l1)
c2 = Counter(l2)

# Intersection 
c1 & c2

>>> Counter({'b': 3, 'c': 2, 'a': 1})

What idiom could distribute Collections Counter into a list of lists where each multiple appears only once in each list?

[['a', 'b', 'c'],['b', 'c'],['b']]
2 Answers
Related