def grouped(seq, size):
    """ @seq: (#iterable)

        -> yields groups
        ..
            lst = [0, 1, 2, 3, 4, 5]
            for group in grouped(lst, 3):
                print(group)
            # (0, 1, 2)
            # (3, 4, 5)
        ..
    """
    return zip(*([iter(seq)] * size))
