Tiger12506 wrote: > I may sound like a know-it-all, but dictionaries *are* iterators.
Mmm, to nit-pick a little, dictionaries are iterables, not iterators. They don't have a next() method. > [a for a in eventData if eventData[a] < time.time()] > > This is more efficient. The keys method creates a list in memory first and > then it iterates over it. I've never tested it but I suspect that when you need keys and values, it is more efficient to use itervalues(): [ k for k, v in eventData.itervalues() if v < time.time() ] and of course if you care about efficiency you should hoist the call to time.time() out of the loop! Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor