On Thu, Oct 1, 2009 at 8:31 PM, Andrius <ziniatink...@gmail.com> wrote: > Hi! > > There are interesting online course > http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/LectureVideos/index.htm > where I'm trying to learn Python. > Looks quite interesting and I would like to create a program which > should repeat a simply string several times with list number before. > Like "1. Wanna more. 2. Wanna more. ..." > Suppose to a loop here repeating, say x times. Should it look like that: > > y="Wanna more. " > x=1 > x=x+d: > d=<100 > print d+y > > How to create a program for such kind of task?
[Forgot to reply-all the first time:] Something like this should do the trick, if I get what you're trying to do: x = 10 for i in range (1, x + 1): print i, "whee" HTH, benno _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor