I have a following dictionary:
origin = {0: [1,2], 1: [1,2,3]}
I would like to get a dictionary that makes combination key_element in value. Desired output is:
{'combo_0_1': 0, 'combo_0_2': 0, 'combo_1_1': 0, 'combo_1_2': 0, 'combo_1_3': 0}
I tried this:
output = {f"combo_{x}_{y}" : 0 for x in origin.keys() for y in origin.values()}
but it returns {'combo_0_[1, 2]': 0, 'combo_0_[1, 2, 3]': 0, 'combo_1_[1, 2]': 0, 'combo_1_[1, 2, 3]': 0} which is not what I want. How can I do it, please?