madsurfer2000 at hotmail.com (-) writes: > Is there a way I can get the next element in the loop? Something like this: > > for a in b: > if a == 1: > print <next a> No, not as long as you use an iterator. If you use an index instead, it's easy of course. for i in xrange(len(b)): if b[i] is 1: print b[i+1]