Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110699
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Michael Selik <michael.selik@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Iteration, while loop, and for loop |
| Date | Tue, 28 Jun 2016 13:58:12 +0000 |
| Lines | 30 |
| Message-ID | <mailman.80.1467122303.2358.python-list@python.org> (permalink) |
| References | <079ff112-8f18-4a27-938f-12e4e55a4a5b@googlegroups.com> <CAGgTfkOkhy8HMd2w-hTHMb4K4vsJhAhoAju2y=+c87Fj=ciZRA@mail.gmail.com> <mailman.75.1467119759.2358.python-list@python.org> <nktu4h$9s1$1@dont-email.me> <CAGgTfkNERRSyxvVDKG=oc8WwRPJWoN54ZCAJ17ZfU54mJ=JCCg@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de 0hHkZZLtXNUs6lUEM6CmAAVyYdvaXODHUsYj1tG6W7Sw== |
| Return-Path | <michael.selik@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.020 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'linear': 0.07; 'subject:while': 0.09; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'variable.': 0.16; 'wrote:': 0.16; '>': 0.18; 'email addr:gmail.com>': 0.18; 'variable': 0.18; 'to:2**1': 0.21; 'programming': 0.22; 'code.': 0.23; "python's": 0.23; 'second': 0.24; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'example': 0.26; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'looks': 0.29; 'url:wikipedia': 0.29; 'url:wiki': 0.30; 'fixed': 0.31; 'another': 0.32; 'michael': 0.33; 'tue,': 0.34; 'received:google.com': 0.35; 'according': 0.36; 'but': 0.36; 'skip:i 20': 0.36; 'url:org': 0.36; 'heard': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'wanted': 0.37; 'skip:v 20': 0.38; 'someone': 0.38; 'why': 0.39; 'url:en': 0.39; 'to:addr:python.org': 0.40; 'elizabeth': 0.72; 'classed': 0.84; "op's": 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dzWXM9Ik3dmIjtslxFQvof26KQ2pAZlWMXx164NHvJ4=; b=nKcM+8JDi5YvVyLFdBdaL4pCrKUaRRYz7YLPKgWDj7TCA8Wdf/hWgBXlKwbm4t45Os Lroj2Bx8PStlx4ADWYSK9XcAZZHdSOW2IjDJeowaA5qIbB+6kQj4XMVZI/XXHZHMooDz H1EKH8AKzNzsWTiqBqlai6bdWdyKO1073/lXVQeBAZwbcFaFTKSGoRaUfCS1lUeTk5bQ xnhwKIgFNunfw1IXd0ZGYDU+GhedaX0msZufcuK8KAeGotg3O0T2kyymQdPFYfjPEtmZ ILhocjfNmsYHnQ9t8lnvvJYAWlFeIwDB7fiMm3jfFG6HD1u6J/tgEIMrlZn+10LkqEii 99+Q== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dzWXM9Ik3dmIjtslxFQvof26KQ2pAZlWMXx164NHvJ4=; b=gEGWlxrChX5GpHSVpnGDxnercql950fUvPMug/R1QmlRS1Hq84VgzgrfoGVftShLB4 +JGIVL5EbXiOE7lmDHzJotdckjAl8P1OKfNCy8VdHD7C8yblk8gBK8+mNvhB3J4QKGyo r5SHxmvm7k5RTQPHQfH1jpkPQdK22O8NFYiyNClKccNTFDTDIk5XlwGYx9vwlKNDkc9J IMrD5EKn+Thf79OLl/Dg4D/oe4hH1EfiuxKJJ8aBkOjlHvocAz/SdDkjgS23Cnu9f5NK wwLXg7bVgUND4RGCR97w2sLX4DvnBTR1YkglJjrm6K8UcmfkFvCvJjcU4+MJ2rvLllon kCYA== |
| X-Gm-Message-State | ALyK8tL+NasNpqL9XCYyOXByMoW97cmCDFxsqfGYny/2sOm006SPeV/a7iesa7cO+yW10SAtfCFg/pcUK90oyg== |
| X-Received | by 10.237.39.167 with SMTP id a36mr1974171qtd.103.1467122301837; Tue, 28 Jun 2016 06:58:21 -0700 (PDT) |
| In-Reply-To | <nktu4h$9s1$1@dont-email.me> |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.22 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CAGgTfkNERRSyxvVDKG=oc8WwRPJWoN54ZCAJ17ZfU54mJ=JCCg@mail.gmail.com> |
| X-Mailman-Original-References | <079ff112-8f18-4a27-938f-12e4e55a4a5b@googlegroups.com> <CAGgTfkOkhy8HMd2w-hTHMb4K4vsJhAhoAju2y=+c87Fj=ciZRA@mail.gmail.com> <mailman.75.1467119759.2358.python-list@python.org> <nktu4h$9s1$1@dont-email.me> |
| Xref | csiph.com comp.lang.python:110699 |
Show key headers only | View raw
On Tue, Jun 28, 2016 at 9:34 AM BartC <bc@freeuk.com> wrote: > On 28/06/2016 14:15, Michael Selik wrote: > > On Tue, Jun 28, 2016 at 8:41 AM Elizabeth Weiss <cake240@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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Iteration, while loop, and for loop Elizabeth Weiss <cake240@gmail.com> - 2016-06-28 05:36 -0700
Re: Iteration, while loop, and for loop Michael Selik <michael.selik@gmail.com> - 2016-06-28 13:15 +0000
Re: Iteration, while loop, and for loop BartC <bc@freeuk.com> - 2016-06-28 14:29 +0100
Re: Iteration, while loop, and for loop Michael Selik <michael.selik@gmail.com> - 2016-06-28 13:58 +0000
Re: Iteration, while loop, and for loop Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-28 22:58 -0700
Re: Iteration, while loop, and for loop BartC <bc@freeuk.com> - 2016-06-28 14:24 +0100
RE: Iteration, while loop, and for loop "Joseph Lee" <joseph.lee22590@gmail.com> - 2016-06-28 06:26 -0700
Re: Iteration, while loop, and for loop Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-06-28 16:42 +0300
Re: Iteration, while loop, and for loop Michael Selik <michael.selik@gmail.com> - 2016-06-28 13:51 +0000
Re: Iteration, while loop, and for loop Steven D'Aprano <steve@pearwood.info> - 2016-06-29 01:20 +1000
Re: Iteration, while loop, and for loop Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-06-28 18:28 +0300
Re: Iteration, while loop, and for loop Tim Chase <python.list@tim.thechases.com> - 2016-06-28 12:23 -0500
Re: Iteration, while loop, and for loop Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-28 17:58 +0000
Re: Iteration, while loop, and for loop Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-29 09:29 -0600
Re: Iteration, while loop, and for loop Steven D'Aprano <steve@pearwood.info> - 2016-06-30 09:59 +1000
Re: Iteration, while loop, and for loop Tim Chase <python.list@tim.thechases.com> - 2016-06-30 05:44 -0500
Re: Iteration, while loop, and for loop Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-30 07:04 -0600
Re: Iteration, while loop, and for loop Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-30 07:10 -0600
Re: Iteration, while loop, and for loop jfong@ms4.hinet.net - 2016-06-30 19:12 -0700
Re: Iteration, while loop, and for loop Veek M <vek.m1234@gmail.com> - 2016-10-27 14:35 +0530
csiph-web