update() can be used to add the contents of one directory to another. : Update « Dictionary « Python Tutorial






dict2= {'host':'earth', 'port':80}
dict3= {'host':'venus', 'server':'http'}
dict2.update(dict3)
print dict2
dict3.clear()
print dict3








8.25.Update
8.25.1.The update method updates one dictionary with the items of another:
8.25.2.update() can be used to add the contents of one directory to another.