Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python Merge Two Dictionaries

dict_1 = {1: 'a', 2: 'b'}
dict_2 = {2: 'c', 4: 'd'}

dict_3 = dict_2.copy()
dict_3.update(dict_1)

print(dict_3)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #Merge #Two #Dictionaries
ADD COMMENT
Topic
Name
3+8 =