0 out of 68 challenges solved

Subtract all the arguments from the first argument to the function

Question:
Write a function called sub that takes multiple arguments and subtracts all the arguments (except the first one) from the first argument. The function should return the result of the subtraction.

Example:
Input: sub(10, 2, 3, 4)
Output: 1

def sub(first, *args):
    """
    Subtracts all the arguments (except the first one) from the first argument and returns the result.

    Args:
    first: The first argument.
    *args: The additional arguments.

    Returns:
    int or float: The result of the subtraction.
    """
    # TODO: Implement the sub function
    pass