Re: [Tutor] Repeating an action

2007-05-12 Thread Andre Engels
2007/5/12, Alan Gilfoy <[EMAIL PROTECTED]>: > How do you 'tell' Python to repeat a certain action X amount of times, > and then stop. > > I could use a 'counter' (see below), but that seems kind of clunky. > > > > counter = 0 > example = True > while example: > > print "Do something" > co

Re: [Tutor] Repeating an action

2007-05-12 Thread F.Lee
On 5/12/07, Alan Gilfoy <[EMAIL PROTECTED]> wrote: > How do you 'tell' Python to repeat a certain action X amount of times, > and then stop. > > I could use a 'counter' (see below), but that seems kind of clunky. > > > > counter = 0 > example = True > while example: > > print "Do something" >

[Tutor] Repeating an action

2007-05-12 Thread Alan Gilfoy
How do you 'tell' Python to repeat a certain action X amount of times, and then stop. I could use a 'counter' (see below), but that seems kind of clunky. counter = 0 example = True while example: print "Do something" counter += 1 if counter == 100: example = False __