One thing to note, the logic of using "in" is not of concern here. This is a *contrived* example, the problem is the slowness of the first iteration. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20141210/e32efa01/attachment.html>