sert <je...@hotmail.com> wrote: > I have written a program that reads data and updates the records > for some people. They are represented by objects, and I need to > read the data from a file, look the person up and then update > his record. > > I have implemented this by creating a list with all the people's > names and another list with their objects (their data). > > It works but after profiling the code it turns out that half the > time spent in the program is spent in the list.index() function > looking up names. Isn't there a less goofy and more efficient > way of doing this?
It sounds like what you are looking for is the dictionary data type. --RDM -- http://mail.python.org/mailman/listinfo/python-list