In [38]: a=0
In [39]: ‘{:06.01f}’.format(a)
The formatting is given in the curly brace contained in a string. 0:06.01f means that this placeholder corresponds to the 0th parameter in “format”. The number has 6 digits including the point with leading 0s, and has one digit following the point.
So the output will be ‘0000.0’.
Used for naming files.
862




被折叠的 条评论
为什么被折叠?



