Problem with Lists & Index command

Steven D. Majewski sdm7g at Virginia.EDU
Sat Jun 12 04:06:38 CEST 1999


On Sat, 12 Jun 1999, Benjamin Schollnick wrote:

> 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)
> 

   tcvalues[entry]=entry3 


 
> 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)


Linear search is usually the slowest algorithm. 
That's why they put indexes and tables-of-contents in books,
so they can be accessed non-sequentially! ;-) 



---|  Steven D. Majewski   (804-982-0831)  <sdm7g at Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---

 "IA-64 looks just about like what you would expect from a PA-RISC
  and IA-32 train wreck with a little VLIW thrown in for spice."
 * Thomas J. Merritt  <tjm at spam.codegen.com> in <news:comp.arch> *





More information about the Python-list mailing list