How to Find Factors of Number using Python?
num=int(input("enter a number"))
factors=[]
for i in range(1,num+1):
if num%i==0:
factors.append(i)
print ("Factors of {} = {}".format(num,factors))
Output
enter a number75
Factors of 75 = [3, 5, 15, 25, 75]