I want to print a double in Python. But it doesn't work, and I don't know why.
My code:
test = 3000 / (1500 * 2000)
print str(test)
I always get a 0
and not a 0.001
even if I do the following:
test = 3000 / (1500 * 2000)
print '%.10f' % test
I get a 0.000000000
and not 0.001
.
How do I tell Python that this should be a double?