[Zope] string n times

Christopher J. Kucera ckucera@globalcrossing.com
Tue, 25 Apr 2000 07:57:14 -0500


Jorge Magalhaes wrote:
> 
> Hi:
> 
> How i can repeat a string n times.  For example in  perl i can do:
> 
>             "*" x $score  ($score is a integer)

In python it'd be:

  '*' * score

Or, in DTML-land:

  <dtml-var "'*' * score">

I've found the Python tutorial to be a good place to find these kinds
of answers: http://www.python.org/doc/current/tut/tut.html

-CJ