How to have negative zero always formatted as positive zero in a python string? August 19, 2023 by Tarik Add zero: >>> a = -0.0 >>> a + 0 0.0 which you can format: >>> '{0:.3f}'.format(a + 0) '0.000'