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 :)
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
How to make tree of dictionary?
Đã xử lý
|
1
thg 1 24
|
5203 | ||
|
1
thg 8 15
|
3875 | |||
|
2
thg 3 15
|
5241 | |||
|
1
thg 3 15
|
32674 | |||
|
1
thg 3 15
|
4288 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
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...