How to generate a continuous string

Amit Khemka khemkaamit at gmail.com
Mon Apr 16 06:13:48 EDT 2007


On 16 Apr 2007 03:03:26 -0700, 人言落日是天涯,望极天涯不见家 <kelvin.you at gmail.com> wrote:
> How to generate a continuous string, like this
> "aaaaaaaaaaaaaaaaaaaaaaa"
> the number of characters is dynamic. Is there a module or function
> implement this string ?
> such as: duplicate_string(char, num)

mystr = mychar*n
n: Integer (number of times you want to duplicate)

Cheers,

-- 
----
Amit Khemka -- onyomo.com
Home Page: www.cse.iitd.ernet.in/~csd00377
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.


More information about the Python-list mailing list