i to all,
how to round 2 decimals, even if the value are 00
example : 12.00
can i do this on python
regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i to all,
how to round 2 decimals, even if the value are 00
example : 12.00
can i do this on python
regards
Python only displays what's needed, so it displated 10.0
If it's the matter of printing it as 10.00.
To do that.
>>> d = 10
>>> print "Value: %.2f" % float(d)
Value: 10.00
>>>
Hope this will help you.
thanks Parikshit :)
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
How to make tree of dictionary?
Risolto
|
|
1
gen 24
|
3850 | |
|
1
ago 15
|
2598 | ||
|
2
mar 15
|
3803 | ||
|
1
mar 15
|
31130 | ||
|
1
mar 15
|
3398 |
We can achieve using python using help of "%.2f" format specifier. Can you explain more your requirement ? where you want to put 2 decimal ? i.e. inside any report or inside any web form etc...