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: 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: References: Date: Mon, 24 Mar 2014 11:52:11 +1100 Subject: Re: loop From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Mon, Mar 24, 2014 at 11:35 AM, 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