(iterable)
return itertools.izip_longest(i, i)
Given an iterable, returns an iterable pairing its items.

    For example,
        list(pair([1,2,3,4,5,6]))
    returns
        [(1,2), (3,4), (5,6)]
Given an iterable, returns an iterable pairing its items.
Given an iterable returns an iterable pairing its items .
def pair(iterable):
    '''Given an iterable, returns an iterable pairing its items.

    For example,
        list(pair([1,2,3,4,5,6]))
    returns
        [(1,2), (3,4), (5,6)]
    '''
    i = iter(iterable)
    return itertools.izip_longest(i, i)
def pair ( iterable ) : i = iter ( iterable ) return itertools . izip_longest ( i , i )