469,929 Members | 1,726 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

How to add pairs to a dict, typo corrected in this one.

Sorry about the typo in the previous message.

I want to keep adding pairs my phone_book dict like

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, 'tom':5678}

Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster

Jul 18 '05 #1
0 1054

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by Raymond Hettinger | last post: by
1 post views Thread by Anthony Liu | last post: by
5 posts views Thread by rbt | last post: by
8 posts views Thread by Florian Lindner | last post: by
6 posts views Thread by ma740988 | last post: by
3 posts views Thread by aking | last post: by
15 posts views Thread by mcjason | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.