I found this function on the internet:
def combos(els, l):
if l == 1:
return [(k,) for k, v in els.items() if v]
cs = []
for e in els:
nd = {k: v if k != e else v - 1 for k, v in els.items() if v}
cs += [(e,)+c for c in combos(nd, l-1)]
return cs
print(combos({'a': 2, 'b': 3}, 3))
And now I would like to somehow monitor the current progress of the function. Is that possible? Thanks in advance