Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68829

Re: loop

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'scale.': 0.07; 'iterate': 0.09; 'cc:addr:python-list': 0.11; '10000000': 0.16; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iteration.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'starts': 0.20; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'received:google.com': 0.35; 'problems': 0.38; 'somebody': 0.38; 'how': 0.40; 'mar': 0.68; '.....': 0.78; '100': 0.79; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=9d20S8fnj5PTGA0xOpYxWMT0x3hTe6NPbG2s07weFt8=; b=cjYKLB0RDHI7PA46dNFgZDErUzLJTwLdz7EmzHzyjr58NE3RnpwwJQidVUek0GmTNT 0iTyx9wMzyEYL2n4Z0y9OvF8LNRfCuAuRSlEXJMZQxmkmKXprtthARBWpCMnvl7oeR0u WBce5RqpUsGhdCtWitRnZD81bKj5pWBvvzjqPFSn/Wub69iDNKaIB4tnBQKvj8R2pC8B Xjod8onMTX1eqQx0A8aR8xlPHO9wA9GMShsaXzvcIjO34Rzt3useoP748OnuU2brv7Jq JpZFlHNJAivept5k+jfnpnSXOpHkdApEYHomGrxh6Z3DfeamAaUQn7dA5Yk26NN4M3Bk 1IHw==
MIME-Version 1.0
X-Received by 10.68.194.65 with SMTP id hu1mr163038pbc.158.1395622331708; Sun, 23 Mar 2014 17:52:11 -0700 (PDT)
In-Reply-To <e2be2ed8-e2b8-427c-b826-e7240ecc5bdf@googlegroups.com>
References <e2be2ed8-e2b8-427c-b826-e7240ecc5bdf@googlegroups.com>
Date Mon, 24 Mar 2014 11:52:11 +1100
Subject Re: loop
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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>
Newsgroups comp.lang.python
Message-ID <mailman.8426.1395622335.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395622335 news.xs4all.nl 2927 [2001:888:2000:d::a6]:37738
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68829

Show key headers only | View raw


On Mon, Mar 24, 2014 at 11:35 AM,  <pabloeruggeri@gmail.com> wrote:
> Hello,
>
> I'm trying to create a for loop that starts at 100 and goes to 10Mllion. The increments are like this: 100, 1000, 10000, ..... Basicaly adding a zero each iteration. I'm having problems trying to do it. Can somebody help me
>

That sounds like a logarithmic scale. Look at this:

>>> 10**2
100
>>> 10**3
1000
...
>>> 10**7
10000000

Do you know how to iterate from 2 to 7 inclusive?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

loop pabloeruggeri@gmail.com - 2014-03-23 17:35 -0700
  Re: loop MRAB <python@mrabarnett.plus.com> - 2014-03-24 00:50 +0000
    Re: loop pabloeruggeri@gmail.com - 2014-03-23 17:57 -0700
  Re: loop Chris Angelico <rosuav@gmail.com> - 2014-03-24 11:52 +1100
    Re: loop Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 09:47 +0200
      Re: loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 09:40 +0000
        Re: loop Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 12:04 +0200
          Re: loop Chris Angelico <rosuav@gmail.com> - 2014-03-24 21:58 +1100
  Re: loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 00:56 +0000
  Re: loop anton <bupphairodazz@yandex.ru> - 2014-03-23 17:59 -0700
    Re: loop Mark H Harris <harrismh777@gmail.com> - 2014-03-23 22:30 -0500
  Re: loop Ben Finney <ben+python@benfinney.id.au> - 2014-03-24 13:31 +1100

csiph-web