tom wrote:
> John Machin wrote:
> > Not quite so many folks come to Python with a background in C these
> > days. Is anyone aware of a tutorial that covers % formatting from a
> > standing start?
> If you're on a unix system you can probably do `man fprintf`, but it
> will mean wading through a l
John Machin wrote:
> tom wrote:
>
>> Why Tea wrote:
>>
>>> print format % values
>>> An optional minimum width of the conversion, specified using one or
>>> more digits or an asterisk (*), which means that the width is taken
>>> from the next item in values
>>>
>>> That's from one of O'reil
tom wrote:
> Why Tea wrote:
> > print format % values
> > An optional minimum width of the conversion, specified using one or
> > more digits or an asterisk (*), which means that the width is taken
> > from the next item in values
> >
> > That's from one of O'reilly's books. But there is no example
> In [50]: '%*s' % (5, 'spam')
> Out[50]: ' spam'
>
Marc, that's exactly what I need. Thanks!
/Why Tea
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>, Why Tea wrote:
> print format % values
> An optional minimum width of the conversion, specified using one or
> more digits or an asterisk (*), which means that the width is taken
> from the next item in values
>
> That's from one of O'reilly's books. But there is no exampl
Why Tea wrote:
> print format % values
> An optional minimum width of the conversion, specified using one or
> more digits or an asterisk (*), which means that the width is taken
> from the next item in values
>
> That's from one of O'reilly's books. But there is no example and I
> couldn't get it
print format % values
An optional minimum width of the conversion, specified using one or
more digits or an asterisk (*), which means that the width is taken
from the next item in values
That's from one of O'reilly's books. But there is no example and I
couldn't get it to work by trials and errors