I am trying to format a number into a string in python. The result I hope for is for 0.1423
to be converted to 000.14
. I tried
num = 0.1423
print '%0.2f' %num
But this just results in the 0.14
. I can't seem to get the leading zeros.
Cheers, James