"Chermside, Michael"
>>> for i in len(myList): ... doSomethingWithIndexes(i)
is simple and elegant.
IMO it would be clearer, and equally elegant, to write this as something like for i in indices(myList): ... which is easily accomplished with the aid of a suitable definition for indices(). No language changes needed. I suspect most people other than number theorists would find the concept of a set of integers being contained in another integer quite wierd. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+