I need to format a float to the format +-00.00, tried the basic string formatting but can\'t get the leading + or - sign or two leading 0s if the value is fractional, any po
Using this should do it
x = 50.4796 a = -50.1246 print " %+2.2f" % (x) print " %+2.2f" % (a)
The following should print
+50.48 -50.12