def subtract(minuend, subtrahend):
    """Subtracts minuend from subtrahend

    This function subtracts minuend from subtrahend only when they are
    either integers or floats

    Args:
        minuend(int/float): The quantity or number from which another
            is to be subtracted
        subtrahend(int/float): The quantity or number to be subtracted
            from another

    >>> subtract(10, 6)
    4

    Returns:
        The difference of subtrahend subtracted by the minuend
    Raises:
        TypeError if subtrahend or minuend is neither an integer or
            float
    """
    if not isinstance(subtrahend, (int, float)):
        raise TypeError(f"{subtrahend} is not an integer or float")
    if not isinstance(minuend, (int, float)):
        raise TypeError(f"{minuend} is not an integer or float")

    return minuend - subtrahend