I would like to append dictionary in a for loop such that i get a concatenated dictionary. Also, it is not necessary that keys of all dictionary will be exactly same.
For eq
one={'a': '2', 'c': 't', 'b': '4'}
two={'a': '3.4', 'c': '7.6'}
three={'a': 1.2, 'c': 3.4, 'd': '2.3'}
Output:
combined={'a':['2','3.4','1.2'],'b':'4','c':['t','7.6','3.4'],
'd':'2.3'}
Now coming to original question:
Every time a for loop iterates, a dictionary will be generated and i would like to append it.
Something like:
emptydict={}
for x in z:
newdict=x.dict()
emptydict.append(newdict)
print(emptydict)