list to dict
bart_nessux at hotmail.com
Wed Jun 16 19:16:32 CEST 2004
Larry Bates wrote:
> If the keys are just indexes that you would
> use in the dictionary, you don't need a
> dictionary at all. Just index into the list.
> You will need to deal with the indexes beginning
> at zero (not 1) or put None in list an then
> don't reference it.
> Larry Bates
> Syscon, Inc.
Thank you Larry, this is fascinating. From your post, I now understand
that a dictionary is much like a database.
For my purpose, I like the idea of an indexed list (this too reminds me
of a database somewhat). Thank you for helping me to understand this. I
can see other objects such as a phone book... I think a dictionary would
be more appropriate for that as it's not really just an indexed list,
but more of a database that associates a number (that has meaning and
purpose) to a name.
More information about the Python-list