On May 21, 2008, at 6:42 AM, Kinuthia Muchane wrote:

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


Does this help?

Another approach is to use dictionaries for string
replacement.

>>> subst = {'some': 'thing'}
>>> print "%(some)s%(some)s%(some)s"  % subst
thingthingthing

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

Reply via email to