>>> l = [1,2,3] >>> i = iter(l) >>> for x in i: ... if x ==2: ... print i.next() ... 3