Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add contents of one dict to another in python

#adding using update() method
dict1 = { key1 : value1 }
dict2 = { key2 : value2 }

dict1.update(dict2)
print(dict1)
#output = { key1 : value1, key2 : value2 } 
 
PREVIOUS NEXT
Tagged: #add #contents #dict #python
ADD COMMENT
Topic
Name
8+4 =