Thanks again Alan.  Much clearer now.  One final part I don't understand.
> 
>>>> "%d is the result of %d + %d" % (6+7,6,7)
> 
>I understand (I think) the 6+7 part but why the ,6,7 after that.  I could 
>see how either '6+7' or '6,7' would be the correct format but not both.

The format string has 3 percent markers - all numbers.
It is therefore expecting 3 values, so I have to give it them.
The first marker gets 6+7, ie 13. The second gets 6 
the third 7...

Look at the first example in the loops topic in my tutorial.
It uses variables in the same way rather than literal values, 
that might make it more obvious. Maybe :-)
 HTH,

Alan G.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to