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
If you want a number, use the round() function:
>>> round(12.3456, 2) 12.35
(but +1 for Michael's answer re. the Decimal type.)
Decimal
If you want a string:
>>> print "%.2f" % 12.34567 12.35