How to add pairs to a dict?

Anthony Liu antonyliu2002 at yahoo.com
Fri Mar 12 03:38:30 EST 2004


I want to keep adding pairs my phone_book dict like
so:

phone_book={'jack':2313, 'john':3436}

And then each time when a new pair is created, for
example, 'tom':5678, I want to add it to the dict so
that the dict becomes 

phone_book={'jack':2313, 'john':3436}



__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com




More information about the Python-list mailing list