How to shorten the float result I got? I only need 2 digits after the dot. Sorry I really don\'t know how to explain this better in English...
Thanks
One way:
>>> number = 1 >>> '{:.2f}'.format(number) #1.00 >>> '{:.3f}'.format(number) #1.000
second way:
>>> '%.3f' % number #1.000 >>> '%.3f' % number #1.000
see "format python"