def iterate_pairs(mylist):
    """Go through an iterable and return the current item and the next"""
    if len(mylist) < 2:
        return
    for i, d in enumerate(mylist[:-1]):
        yield mylist[i], mylist[i + 1]
    return
