[Tutor] A file containing a string of 1 billion random digits.
ALAN GAULD
alan.gauld at btinternet.com
Mon Jul 19 19:18:39 CEST 2010
Wikipedia is a little more helpful but not Python oriented:
http://en.wikipedia.org/wiki/Printf#printf_format_placeholders
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/
----- Original Message ----
> From: Richard D. Moores <rdmoores at gmail.com>
> To: ALAN GAULD <alan.gauld at btinternet.com>
> Cc: tutor at python.org
> Sent: Monday, 19 July, 2010 18:07:47
> Subject: Re: [Tutor] A file containing a string of 1 billion random digits.
>
> On Mon, Jul 19, 2010 at 09:58, ALAN GAULD <
> ymailto="mailto:alan.gauld at btinternet.com"
> href="mailto:alan.gauld at btinternet.com">alan.gauld at btinternet.com>
> wrote:
> Heres what I did:
> Search Google for "Python format
> strings" and from the first link click
> on String Formatting operations
> in the contents pane:
>
>
> href="http://docs.python.org/library/stdtypes.html#string-formatting-operations"
> target=_blank
> >http://docs.python.org/library/stdtypes.html#string-formatting-operations
>
>
> Read item number 4.
"4. Minimum field width (optional). If specified as
> an '*' (asterisk),
the actual width is read from the next element of the
> tuple in values,
and the object to convert comes after the minimum field
> width and
optional precision."
Now that just screams for about a dozen
> well-designed illustrative
examples, don't you think?
Thanks,
> Alan.
More information about the Tutor
mailing list