for x in xs:
    yield x, None
for y in ys:
    yield None, y
xs = [1, 2, 5, 6]
ys = [2, 3, 4, 5]
print(list(pairs(xs, ys)))
Python: Fast and minimalistic way to zip and pair matching elements in two lists