Re: [Tutor] NewBie Question... Variables

2005-02-15 Thread Alan Gauld
> How can I do it with several variables? > I = "John" > print "%s used to love pizza" % I wrap them in parens: >>> a,b = 3,4 >>> print "%d x %d = %d" % (a,b, a*b) > About 10 or more... Same technique but you might find it easier to use labels to identify the fields. >>> sum = a+b >>> print

Re: [Tutor] NewBie Question... Variables

2005-02-15 Thread Liam Clarke
a = "foo" b = "bar" c = "duck" print "I will say only this - %s to your %s and no %s" % (a, b, c) I will say only this - foo to your bar and no duck And so forth. On Tue, 15 Feb 2005 19:07:56 +0900, ì ìì <[EMAIL PROTECTED]> wrote: > How can I do it with several variables? > > I = "John" > pr