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

Newsgroups comp.lang.python
Date 2015-10-23 08:42 -0700
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

Show all headers | 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