def pairwise(iterable):
    """
    Iter over an iterable, two items by two items

    >>> list(range(10)|pairwise())
    [(0, 1), (2, 3), (4, 5), (6, 7), (8, 9)]
    """
    a = iter(iterable)
    return zip(a, a)