[docs] [issue24281] String formatting: incorrect number of decimal places

Christopher Welborn report at bugs.python.org
Mon May 25 06:02:58 CEST 2015


Christopher Welborn added the comment:

You forgot the 'f' to specify that you want float formatting:

```
>>> '{:08.3f}'.format(12.34)

 '0012.340'
```

----------
nosy: +cjwelborn

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24281>
_______________________________________


More information about the docs mailing list