def getDigits(num,baseNum,digitsList):
    """
    Input: num, baseNum, and digitsList must all come from base(num,base) as is
    currently specified.

    Output: returns each digit in the output number of base(num,base).
    """
    tmpList=[]
    for x in digitsList:
        if x*(baseNum)>num:
            tmpList.append(x)
    
    return max((set(digitsList)-set(tmpList)))

    Input: num, baseNum, and digitsList must all come from base(num,base) as is
    currently specified.

    Output: returns each digit in the output number of base(num,base).
    
recipes/Python/578630_Convert_decimal_basen_any_positive_n_less_thor/recipe-578630.py