def join(sep, iterable): iterator = iter(iterable) yield from next(iterator) for i in iterator: yield from sep yield from i