0 steave posted What is the code to merge two dictionaries into a single expression in Python? i need to merge two dictionaries into a new dictionary. but dont know how to do it ? Edit Question
0 QuickIos answered Jun 29 '23 00:00 unpacking operator ** will do the job . ** operator is used to unpack dictionaries dict1 = { **{'c': 3, 'd': 4'} ,'a': 1, 'b': 2' } now dict1 is 'c': 3, 'd': 4',,'a': 1, 'b': 2' Edit Answer
0 angeo answered Jun 29 '23 00:00 ** operator is used to unpack the key-value pairs of two or any number dictionary within a new dictionary literal. The resulting dictionary contains all the key-value pairs from all dictionary. Edit Answer