Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
326 B
1
Indexable
Never
Given these two dictionaries, write the code to merge them with respect to keys. The values should be in sorted order. Create a class called mergeDict and have a function in it which takes input1 and input2 as parameters.

input1 = {'a':1,'b':2,'c':4}
input2 = {'c':3,'d':5,'e':6, 'f':7 }
# out={a:1,b:2,c:[3,4],d:5,e:6,f:7}

Leave a Comment