import itertools


def pairwise(iterable):
    """This function is used to create pairwise pairs
    for the input iterable. An example is given below."""
    # pairwise('ABCDEFG') --> AB BC CD DE EF FG
    a, b = itertools.tee(iterable)
    next(b, None)
    return zip(a, b)