def factor(n):
l = []
while n > 1:
for i in range(2, n + 1):
if n % i == 0:
n = int(n / i)
if n == 1:
l.append(i)
else:
l.append(i)
break
return l
print(factor(45))
print(factor(100))