Michele Simionato > Second answer: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/202234 I just added this alternative >>> a = [1, 2, 9, 0] >>> n = iter(a).next >>> while [x for x in [n()] if x]: ... print "I have", x ... I have 1 I have 2 I have 9 >>> Again, don't this in real code. Evil. But cute. Andrew dalke at dalkescientific.com