Getting float=04 out of int=4
I need to convert integers into two decimal float开发者_如何学Python numbers. So if i have an integer 3 i want it to be float 03. But if i have an two digit integer 33, i want it to be float 33.
The float value will always just be the actual number value. If you want to display that value and have to appear with a leading 0, you will have to use string formatting and the format options to produce "03"
from a value of 3
.
精彩评论