On Aug 9, 9:31 pm, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I want my 76.1 to be rounded to decimal 80 and 74.9 to decimal 70.
> How can I achieve that?

>>> import decimal
>>> [decimal.Decimal(int(round(x, -1))) for x in (76.1, 74.9)]
[Decimal("80"), Decimal("70")]
>>>


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to