def a(): yield "a1" def b(): yield "b1" yield "b2" x,y = a(),b() zip(x,y) # => [("a1","b1")] next(x) # => raise StopIteration next(y) # => "b2" x,y = a(),b() zip(y,x) # => [("b1","a1")] next(x) # => raise StopIteration next(y) # => raise StopIteration