def weave_items(iterator, alternator, weave_item):
    """Return an iterator for iterator, applying weave_item to each item with
    its pair in alternator.
    """
    for item in iterator:
        yield weave_item(item, alternator.next())
Return an iterator for iterator, applying weave_item to each item with
    its pair in alternator.
    
recipes/Python/139210_repeating_alternator/recipe-139210.py