def get_digits(num, base=10):
    """Transforms an int into a list of integers with the digits in an arbitrary
    base"""
    digits = []
    while num > 0:
        digits.append(num % base)
        num = num//base
    return digits[::-1]