def drop_at(nth, xs):
    """
    Drop nth element in a list. Returns the init and tail of the xs without the nth element.
    """
    if nth <= 0:
        return [], xs
    elif len(xs) < nth:
        return xs, []
    return xs[: nth - 1], xs[nth:]