def all_but(list_obj, idx):
    """Returns the given list will all but a single item.

    Parameters
    ----------
    list_obj : list
        The list from which to take out an element.
    idx : int
        The index of the element to take out.

    Returns
    -------
    list
        The list with the element taken out.

    Example
    -------
    >>> arr = [12, 34, 5, 54]
    >>> all_but(arr, 2)
    [12, 34, 54]
    >>> all_but(arr, 0)
    [34, 5, 54]
    >>> all_but(arr, 3)
    [12, 34, 5]
    """
    return list_obj[0:idx] + list_obj[idx + 1:]
