[Tutor] Is there an easy way to combine dictionaries?
Lane, Frank L
frank.l.lane at boeing.com
Tue Sep 6 13:44:29 CEST 2005
Hi List,
Is there an easy way to combine dictionaries?
e.g.
a = {}
b = {}
a = {'a':'a', 'b':'b', 'c':'c'}
b = {'1':1, '2':2, '3':3}
c = a + b # doesn't seem to work
desired:
c = {'a':'a', 'b':'b', 'c':'c', '1':1, '2':2, '3':3}
Thanks,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050906/0ba16fc4/attachment.htm
More information about the Tutor
mailing list