def as_pairs(seq):
    """Return sequence split in two, each containing every second item."""
    if len(seq) % 2:
        raise ValueError('Sequence length not even: {}'.format(len(seq)))
    return seq[0::2], seq[1::2]