merge assumes the inputs are sorted (maybe it should be renamed). It'll still work, because merge doesn't complain, but it'll do extra looping and comparisons. What we really want is the chain() function from itertools.