Dictionaries

Tim Chase python.list at tim.thechases.com
Wed Oct 18 17:51:02 CEST 2006


> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
> 
> I need
> 
> the result {'a':1,'b':2}.

 >>> a.update(b)
 >>> a
{'a':1,'b':2}

-tkc





More information about the Python-list mailing list