new_dict={}
d1={'name1':'Jaison','name3':'Eldose','name2':'Manu'}
d2={'age1':29,'age2':26,'age3':28}
d3={'job1':'NJ','job2':'SE','job3':'SE'}
def Combine_dictionaries(*args):
for arg in args:
for i,j in arg.items():
print(i,j)
new_dict[i]=[j]
return new_dict
print(Combine_dictionaries(d1,d2,d3))
print(new_dict.items())
out put:
dict_items([('name1', ['Jaison']), ('name3', ['Eldose']), ('name2', ['Manu']), ('age1', [29]), ('age2', [26]), ('age3', [28]), ('job1', ['NJ']), ('job2', ['SE']), ('job3', ['SE'])])
Question: Is there any suggestions to improve the output ?