New course! Every coder should learn Generative AI!
Try a free lesson0
How do I get this code to print it’s output in a list?
n = int(input()) def facts(x): for i in range(1,x+1): for j in range(1,x+1): if x / i == j: print(i) print(facts(n))
1 Answer
+ 1
Append those values into a empty list..
then print it.