Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Merge dictionaries in python

dict_1 = {'John': 15, 'Rick': 10, 'Misa' : 12 }
dict_2 = {'Bonnie': 18,'Rick': 20,'Matt' : 16 }
dict_1.update(dict_2)
print('Updated dictionary:')
print(dict_1)
Source by favtutor.com #
 
PREVIOUS NEXT
Tagged: #Merge #dictionaries #python
ADD COMMENT
Topic
Name
7+3 =