If you wanted to make a single sequence from the two, you could use
chain
from the itertools module, e.g.>>> import itertools >>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> itertools.chain(x, y) <itertools.chain object at 0x7f38338dfb90> >>> list(itertools.chain(x, y)) [1, 2, 3, 4, 5, 6]
chain
returns an iterator (basically a form of lazy sequence), so I pass that to list
to force evaluation of all the items (I could have printed or something too, of course).