def to_base(number, base):
    """Convert a decimal to another other base.

    Convert a base 10 number to any base from 2 to 16.

    Args:
        number: A decimal number.
        base: The base of the provided number.

    Returns:
        A string with the number in a requested base.

    """
    # Hold a conversion dict for ease of lookups
    converter = {
            10: 'A',
            11: 'B',
            12: 'C',
            13: 'D',
            14: 'E',
            15: 'F',
    }
    # A list to hold each character before conversion
    store = []
    while number > 0:
        # The reminder is the digit
        digit = number % base
        number = number // base
        if converter.get(digit, None):
            # Lookup the corresponding alphabet
            store.append(converter[digit])
        else:
            store.append(str(digit))
    # Reverse the list before joining and printing
    store.reverse()
    return ''.join(store)