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


Groups > comp.lang.python > #97921

Resetting the Range start in the middle of a loop

X-Received by 10.68.209.129 with SMTP id mm1mr3905754pbc.5.1445614974146; Fri, 23 Oct 2015 08:42:54 -0700 (PDT)
X-Received by 10.50.124.69 with SMTP id mg5mr94075igb.10.1445614974072; Fri, 23 Oct 2015 08:42:54 -0700 (PDT)
Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!kq10no27007263igb.0!news-out.google.com!n2ni42370igy.0!nntp.google.com!kq10no27007253igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Fri, 23 Oct 2015 08:42:53 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=75.77.31.97; posting-account=I1dMFwoAAAB-b9uaJe48QqEeVazTtStk
NNTP-Posting-Host 75.77.31.97
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <ea58da60-3fb1-46e1-91db-ed48beebfd5c@googlegroups.com> (permalink)
Subject Resetting the Range start in the middle of a loop
From bigred04bd3@gmail.com
Injection-Date Fri, 23 Oct 2015 15:42:54 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:97921

Show key headers only | View raw


I am wanting to reset a Range start while a loop is running.  here is what I have:


s = 1
for i in range(s, 1000):
    # do stuff
        for r in range(i, 1000):
            # do stuff
            s = s + 100  #example
            break


I've also tried to update the i as well, but it just continues on to the next number as if it was never updated.

any help would be great

Thanks

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


Thread

Resetting the Range start in the middle of a loop bigred04bd3@gmail.com - 2015-10-23 08:42 -0700
  Re: Resetting the Range start in the middle of a loop John Gordon <gordon@panix.com> - 2015-10-23 17:15 +0000
  Re: Resetting the Range start in the middle of a loop Peter Pearson <pkpearson@nowhere.invalid> - 2015-10-23 17:23 +0000
  Re: Resetting the Range start in the middle of a loop Steven D'Aprano <steve@pearwood.info> - 2015-10-24 11:05 +1100
  Re: Resetting the Range start in the middle of a loop Nobody <nobody@nowhere.invalid> - 2015-10-24 03:13 +0100
  Re: Resetting the Range start in the middle of a loop bigred04bd3@gmail.com - 2015-10-23 19:31 -0700

csiph-web