def cleave(sequence, index):
    """
    Cleaves a sequence in two, returning a pair of items before the index and
    items at and after the index.
    """
    return sequence[:index], sequence[index:]