> Thank you for your suggestion. I tried creating a > dictionary of 'what' list and searched keys with > has_key method and it is pretty fast.
Use try/except and it will be faster still. The except only gets triggered if theres a missing entry - which in your case should be hardly ever! So you save a function call per item... Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor