Message: 8
Date: Thu, 31 Jul 2008 20:16:54 -0700 (PDT)
From: Angela Yang <[EMAIL PROTECTED]>
Subject: [Tutor] how do I create a lists of values associated with a
       key?
To: tutor@python.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"


> That did not work because list index is not numeric.

Dictionary is an unordered set (list is an ordered set) indexed by a
immutable value (e.g. string, numbers, tuple)

> But for dictionaries, it is key - value pairs.? But I need key -> multiple
values.

That would mean, a dictionary of lists. Dictionary keys cannot be a mutable
(i.e. list cannot be a dictionary key) but dictionary's value may be
mutable.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to