import math


def truncate(number, digits) -> float:
    """ Truncates number to a specified number of digits
    Args:
        number (float): Number to truncate
        digits   (int): No. of digits to truncate to
    Returns:
        Truncated number (float)
    """
    stepper = 10.0 ** digits
    return math.trunc(stepper * number) / stepper