I need to output decimal numbers in a price format,
i.e.
10 = 10.00
11.1 = 11.10
How can I achieve this using decimal.Decimal class ?
pad_zero(Decimal('10.0'))
>>>Decimal('10.00')
*EDIT:*format method does not fit my need because I need to pass it on as decimal, I understand though, that i can convert it back to afterwards, but such to-and-fro seems somewhat unpythonic.
try this :