On Tue, Jun 28, 2016 at 9:34 AM BartC <b...@freeuk.com> wrote: > On 28/06/2016 14:15, Michael Selik wrote: > > On Tue, Jun 28, 2016 at 8:41 AM Elizabeth Weiss <cake...@gmail.com> > wrote: > > > >> I do not understand the second code. What is counter? > >> > > > > It looks like someone wanted to make a loop induction variable. > > https://en.wikipedia.org/wiki/Induction_variable > > I don't know if that helps; I've never heard of an induction variable. >
But you've seen them often in other programming languages? > And according to the first example in that link, then 'word' in the OP's > second example might be classed as an induction variable too! The variable ``word`` was not being incremented/decremented by a fixed amount, nor was it a linear function of another induction variable. > Confusing. Indeed. That's why Python's for-loops are preferable. -- https://mail.python.org/mailman/listinfo/python-list