Mega Code Archive

 
Categories / Python Tutorial / Dictionary
 

Update() can be used to add the contents of one directory to another

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