0
Merge a dictionary
While merging 2 dicts into one, Why python picks a key(present in both dict) from second dict? #merge a dict pl1={'Ronaldo': 8, 'RVP':3} pl2={'RVP':4,'Messy':8} allplayers={**pl1,**pl2 } print(allplayers) #o/p {'Ronaldo':8, 'RVP':4, 'Messy':8} Why not RVP:3 in the output?
2 Answers