loop

Marko Rauhamaa marko at pacujo.net
Mon Mar 24 03:47:44 EDT 2014


Chris Angelico <rosuav at gmail.com>:

> On Mon, Mar 24, 2014 at 11:35 AM,  <pabloeruggeri at gmail.com> wrote:
>> I'm trying to create a for loop that starts at 100 and goes to 10Mllion.
>
> That sounds like a logarithmic scale.

How about:

    for i in [ 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 ]:
        ...


Marko



More information about the Python-list mailing list