On Mon, Mar 24, 2014 at 1:12 PM, Chris Angelico <ros...@gmail.com> wrote: > Incidentally, I've often modified my loop counter, in C or REXX or any > other language. About the only situation where I actually miss it in > Python, though, is iterating over a list and mutating the list on the > way through; and even that can often be done in other ways (maybe a > list comp, filtering out some of the elements?). It's amazing how > something can be so utterly fundamental (I mean, come ON! Who can > imagine a language with no equivalent of the basic "do i=1 to 10" > (REXX) or "for (int i=0;i<10;++i)" (C++) loop???) and yet so > dispensable.
I'm not sure "fundamental" is the right word. A for loop is just a while loop with some syntactic sugar. For that matter, a while loop is just a structured goto... -- https://mail.python.org/mailman/listinfo/python-list