im trying to return the divisors of 2 numbers that i appended to an empty list. why is nothing being printed? im expecting for 1,2,3 to be returned to mw but i get returned "[]" and "none"
def fun (t,g) :
list1 = []
i = 1
r = 1
while i < t :
if i % t == 0 :
list1.append(i)
i = i + 1
while r < g :
if r % g == 0 :
list1.append(r)
r = r + 1
print list1
x = 4
y = 6
t = fun(x,y)
print t