append to the end of a dictionary

Yves Glodt y.glodt at sitasoftware.lu
Tue Jan 24 09:46:54 EST 2006


Yves Glodt wrote:
> Hi there,
> 
> I seem to be unable to find a way to appends more keys/values to the end 
> of a dictionary... how can I do that?
> 
> E.g:
> 
> mydict = {'a':'1'}
> 
> I need to append 'b':'2' to it to have:
> 
> mydict = {'a':'1','b':'2'}
> 
> 
> 
> How to do?

Sorry for the noise...

mydict['b'] = '2'

> Best regards,
> Yves





More information about the Python-list mailing list