def get_exponent(number, base):
    """If number = base**k, returns k. Else returns None
    """
    if number <= 1: return 0
    k = 0
    if base > 1:
        while number % base == 0:
            number /= base
            k += 1
    return k if number == 1 else None