I'd just like to know the best way of listing all integer factors of a number, given a dictionary of its prime factors and their exponents.
For example if we have {2:3, 3:2, 5:1} (2^3 * 3^2 * 5 = 360)
Then I could write:
for i in range(4):
for j in range(3):
for k in range(1):
print 2**i * 3**j * 5**k
But here I've got 3 horrible for loops. Is it possible to abstract this into a function given any factorization as a dictionary object argument?