On Sunday 26 June 2011 17:15:14 Alan Gauld wrote:
> "Lisi" wrote
> Umm, nearly...
> The format string contains format specifiers. They are not variables.
> The specifiers define the type of data to be inserted into the string
> as well as how the data will be formatted - hence the name.
>
> So you
"Lisi" wrote
So, if I have now understood correctly, a format string is a string
containing
at least one variable, and the variable(s) is/are preceded by the %
symbol.
Yes???
Umm, nearly...
The format string contains format specifiers. They are not variables.
The specifiers define the type
On Sun, Jun 26, 2011 at 2:42 PM, Lisi wrote:
> Thanks, Noah and Steven. :-)
>
> On Sunday 26 June 2011 12:24:12 Steven D'Aprano wrote:
>> Lisi wrote:
>> > In the following excerpt from a program in the book I am following:
>> >
>> > print "If I add %d, %d, and %d I get %d." % (
>> > my_a
Thanks, Noah and Steven. :-)
On Sunday 26 June 2011 12:24:12 Steven D'Aprano wrote:
> Lisi wrote:
> > In the following excerpt from a program in the book I am following:
> >
> >print "If I add %d, %d, and %d I get %d." % (
> > my_age, my_height, my_weight, my_age + my_height + my_weight
Lisi wrote:
In the following excerpt from a program in the book I am following:
print "If I add %d, %d, and %d I get %d." % (
my_age, my_height, my_weight, my_age + my_height + my_weight)
is
% (
my_age, my_height, my_weight, my_age + my_height + my_weight)
the/a format str
On Sun, Jun 26, 2011 at 12:05 PM, Lisi wrote:
> In the following excerpt from a program in the book I am following:
>
> print "If I add %d, %d, and %d I get %d." % (
> my_age, my_height, my_weight, my_age + my_height + my_weight)
>
> is
>
> % (
> my_age, my_height, my_weight, my_age +
In the following excerpt from a program in the book I am following:
print "If I add %d, %d, and %d I get %d." % (
my_age, my_height, my_weight, my_age + my_height + my_weight)
is
% (
my_age, my_height, my_weight, my_age + my_height + my_weight)
the/a format string?
If not, th