def to_decimal(number, base):
    """Convert a number to decimal from another base

    Convert a number from any base into decimal.

    Args:
        number: A string representing a number in base 2 to 16.
        base: The base of the number.

    Returns:
        An integer in base 10 of the number provided

    """
    converter = {
        'A': 10,
        'B': 11,
        'C': 12,
        'D': 13,
        'E': 14,
        'F': 15,
    }
    decimal = 0
    pos = 0
    while number:
        # Extract digits from the back of the number
        digit = number[-1]
        number = number[:-1]
        # Get the actual number in case it's an alphabet
        if converter.get(digit, None):
            digit = converter[digit]
        else:
            digit = int(digit)
        # Perform the multiplications
        decimal += (base ** pos) * digit
        pos += 1
    return decimal