File size: 185 Bytes
c668e80
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import itertools


def product_dict(**kwargs):
    keys = kwargs.keys()
    vals = kwargs.values()
    for instance in itertools.product(*vals):
        yield dict(zip(keys, instance))