append to the end of a dictionary

Juho Schultz juho.schultz at helsinki.fi
Tue Jan 24 09:44:29 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'}
> 
mydict['b'] = '2'



More information about the Python-list mailing list