0
I have a string str(owner.Vr_real).replace('.',',')
which receives values of the type:
- 2045.5
- 3040,45
- 4042,05
Note that the first number does not complete with 0 (ex: 2045.50). What function could I use to add 0 at the end? I tried using zfill
, but without success.
Yes, the first example of the documentation would have already answered my question: >>> print '%(language)s has %(number)03d quote types. ' % ... {"language": "Python", "number": 2} Python has 002 quote types.
– user2287892