def intersperse(sep, iterable):

    for i, item in enumerate(iterable):
        if i: yield sep
        yield item

# helper
The 'intersperse' generator takes an element and an iterable and
dataset/ETHPy150Open edgewall/trac/tracopt/versioncontrol/git/git_fs.py/intersperse