Hello alltogether,
is it possible to format stings with fixed width of let's say 7 character. T
need a floating point with 3 chars before dot, padded with ' ' and 3 chars after
dot, padded with '0'.
Followingh is my approach
'21.100'
But there are missing ' '. How can I get that? (For bigger numbers than 999 they
might be cut: 1021 -021)
Alexander
is it possible to format stings with fixed width of let's say 7 character. T
need a floating point with 3 chars before dot, padded with ' ' and 3 chars after
dot, padded with '0'.
Followingh is my approach
>>f = 21.1
>>s = "%.03f" % f
>>s
>>s = "%.03f" % f
>>s
But there are missing ' '. How can I get that? (For bigger numbers than 999 they
might be cut: 1021 -021)
Alexander