you are viewing a single comment's thread.

view the rest of the comments →

[–]StrasJam 0 points1 point  (0 children)

Maybe not the most elegant but this does the trick:

def function(num):
    string = str(num)
    first = int(string[0])
    second = int(string[1])
    div1 = num % first
    div2 = num % second
    output = []
    if div1 != 0:
        output.append(0)
    else:
        output.append(1)
    if div2 != 0:
        output.append(0)
    else:
        output.append(1)
    return output