This is the P2PU Archive. If you want the current site, go to www.p2pu.org!
You haven't posted any discussions yet.
%f returns a decimal with 6 places.
i.e:
>>>print "%f"%5
5.000000
%.2f will return a number formatted to 2 decimals.
>>>print "$%.2f"%500
$500.00
>>> "%.2f"%5.456
'5.46'
>>> "%.2f"%5.999
'6.00'
That is the first time I've ever had python round off???