Fwd: Re: [Tutor] concatenating two variables
Chris Keelan
rufmetal@home.com
Mon, 22 Oct 2001 20:25:51 -0500
On Mon, 22 Oct 2001, tonycervone wrote:
>2 methods:
>A)
>>>variable1='good', variable2 = ('good', 'dog')
OOPS: that should be:
>>> variable1 = 'good' ; variable2 = 'dog'
I was trying to get fancy. You could always do it the safe way:
>>>variable1 = 'good'
>>>variable2 = 'dog'
>>>print variable1 + " " + variable2
good dog
B)
>>print '%s %s" % (var1, var2)
good dog
> thanks.
No thank you for asking something I can answer!
- Chris
Wesley Chun's "Core Python Programming", Chapter 6 and counting!
-------------------------------------------------------