Problem with Lists & Index command

Benjamin Schollnick rfreedm1 at nospam.rochester.rr.com
Fri Jun 11 20:25:34 EDT 1999


On Fri, 11 Jun 1999 21:44:47, Doug Hellmann 
<doughellmann at mindspring.com> wrote:

> > It appears that INDEX doesn't work on a multiple
> > dimension list????
> 
> Using index() on tcmlist is only going to search through the values in
> tcmlist.  It won't look inside the tuples that tcmlist contains.  So,
> you either have to construct a tuple to pass to index, or use a
> dictionary instead of a list:

Example cut.....to save space...

I'll try this over the weekend...

But, the most obvious question, is.....

Can dictionaries be made & manipulated from
variables?

> tcmvalues = { 'EFGHI':1,
>               'JKLMN':2,
>               'ABCD':3,
>             }

i.e.
	tcmvalues.append ( entry:entry3)

etc...

Please keep in mind, that I don't know anything about
dictionaries... The book I'm using hasn't hit 'em yet....
(I'm not done reading yet)

		- Benjamin




More information about the Python-list mailing list