I am trying to create a dictionary combining other dictionaries. But number of these dictionaries are variable. For fixed number of dictionaries I figured out the code:
x = {"Age": 20}
y = {"Age": 30}
z = {"Age": 40}
output = dict(rule1 = x,rule2 = y, rule3 = z)
In the above example new dictionary(output) is created using fixed number of dictionaries i.e. 3. Now I have 'n' number of dictionaries, how to combine these?
dict_1 = {"Age": 123}
dict_2 = {"Age": 45}
'
'
'
'
'
dict_n = {"Age": 56}
final_output = dict(dict_1, dict_2,......dict_n)