You can generate all possible values via itertools.product
Then you can iterate through the values and create your list of dictionaries by zipping together keys and values
from itertools import product
dct = {'brand': ['Three Squirrels', 'liang', 'BE'],
'op': ['交', '差'],
'cate': ['aaaa','bbbb','cccc']
}
#Get the list of keys
keys = dct.keys()
#Iterate through the values, and zip key and value together
result = [ dict(zip(keys, item)) for item in product(*dct.values())]
print(result)
print(len(result))
The output will be
[{'brand': 'Three Squirrels', 'op': '交', 'cate': 'aaaa'},
{'brand': 'Three Squirrels', 'op': '交', 'cate': 'bbbb'},
{'brand': 'Three Squirrels', 'op': '交', 'cate': 'cccc'},
{'brand': 'Three Squirrels', 'op': '差', 'cate': 'aaaa'},
{'brand': 'Three Squirrels', 'op': '差', 'cate': 'bbbb'},
{'brand': 'Three Squirrels', 'op': '差', 'cate': 'cccc'},
{'brand': 'liang', 'op': '交', 'cate': 'aaaa'},
{'brand': 'liang', 'op': '交', 'cate': 'bbbb'},
{'brand': 'liang', 'op': '交', 'cate': 'cccc'},
{'brand': 'liang', 'op': '差', 'cate': 'aaaa'},
{'brand': 'liang', 'op': '差', 'cate': 'bbbb'},
{'brand': 'liang', 'op': '差', 'cate': 'cccc'},
{'brand': 'BE', 'op': '交', 'cate': 'aaaa'},
{'brand': 'BE', 'op': '交', 'cate': 'bbbb'},
{'brand': 'BE', 'op': '交', 'cate': 'cccc'},
{'brand': 'BE', 'op': '差', 'cate': 'aaaa'},
{'brand': 'BE', 'op': '差', 'cate': 'bbbb'},
{'brand': 'BE', 'op': '差', 'cate': 'cccc'}]
18