[Tutor] how do I create a lists of values associated with a key?
lie.1296 at gmail.com
Thu Aug 28 14:23:02 CEST 2008
Date: Thu, 31 Jul 2008 20:16:54 -0700 (PDT)
From: Angela Yang <angelayian at yahoo.com>
Subject: [Tutor] how do I create a lists of values associated with a
To: tutor at python.org
Message-ID: <279879.31091.qm at web50107.mail.re2.yahoo.com>
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
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor