[Tutor] need advice about a dictionary ({})
Marc Tompkins
marc.tompkins at gmail.com
Sun Sep 11 02:34:26 CEST 2011
On Sat, Sep 10, 2011 at 4:18 PM, Richard D. Moores <rdmoores at gmail.com>wrote:
> On Sat, Sep 10, 2011 at 15:32, Alan Gauld <alan.gauld at btinternet.com>
> wrote:
>
> So you open the file and from that point on treat it exactly like a
> > dictionary.
>
> I'm still a bit shaky about dictionaries.
>
> That right there is the salient bit. Using shelve is just like using a
dictionary; probably that's why you're finding the documentation sparse:
dictionaries are core Python, so they assume you know how to use them.
("First, catch your rabbit...")
I was about to write an introduction to dictionaries, but I realized it's
been done, and done better than I could. I really recommend that you learn
them; I think that once you do, you'll find that they're a better fit in all
sorts of places where you've been using lists. (Speaking from personal
experience...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110910/7d80fb10/attachment.html>
More information about the Tutor
mailing list