Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import itertools as it
from collections import Counter
l = [1,14,14,4,11,7,6,9,8,10,10,5,13,2,3,15]
ans = []
for i in range(len(l)):
for d in it.combinations(l,i):
counter = Counter(ans)
for num, cnt in counter.most_common():
print(num, cnt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment