Thanks for your fast reply. I'm fine with your "%7.03f" solution. (negatives
are
not significant)
Alexander Eisenhuth schrieb:
> 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
>
Steve Holden wrote:
> Alexander Eisenhuth wrote:
>> 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 approac
On 16 Mar, 13:20, Alexander Eisenhuth <[EMAIL PROTECTED]>
wrote:
> 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 a
Alexander Eisenhuth wrote:
> 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
> >>> f = 21.1
> >>> s =
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
>>> f = 21.1
>>> s = "%.03f" % f
>>> s
'21.100'
But there are mis
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
>>> f = 21.1
>>> s = "%.03f" % f
>>> s
'21.100'
But there are mis