Trying to understand a very simple class - from the book "dive into python"

Diez B. Roggisch deets at
Wed May 20 18:18:05 CEST 2009

walterbyrd wrote:

> On May 20, 9:59 am, Marco Mariani <ma... at> wrote:
>> Do you know what a dictionary is?
> Yes, but I thought  a dictionary used curly brackets. Is the object a
> dictionary?

foo = {"key" : "i'm the value of a dictionary"}
print foo["key"]

I suggest you read the tutorial:


More information about the Python-list mailing list