> I have implemented it this way, may be, there should be a built in > hiding somewhere in the standard libraries? the itertools module might have what you're after. something similar to your example: >>> import itertools >>> r = iter(range(100)) >>> n = itertools.dropwhile(lambda x:x<=13, r) >>> n.next() 14