st = "String"
print "%s " %st*3
String String String


Does this help?

Kinuthia...

-----------------------------

Message: 6
Date: Wed, 21 May 2008 15:05:21 +0530
From: Faheem <[EMAIL PROTECTED]>
Subject: [Tutor] String Replacement question
To: tutor@python.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII

Hi all,
 How do I replace the same value multiple times without repeating the
same variable name/value repeatedly?
for ex.

 some = 'thing'
 print '%s %s %s %s' % (some,some,some,some)

in this case, my question is how do i replace "% (some,some,some)" with
something more concise?

thanks in advance,
Faheem

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to