def delete_after(list, key):
    """
    Return a list with the item after the first occurrence of the key
    (if any) deleted.
    """
    if list == ():
        return ()
    else:
        head1, tail1 = list
        if head1 == key:
            # Leave out the next item, if any
            if tail1 == ():
                return list
            else:
                head2, tail2 = tail1
                return (head1, tail2)
        else:
            return (head1, delete_after(tail1, key))