0

I want to jump back to a certain point in my list of integers in python, so that a for loop keeps going longer.

I made that work by making a for loop go for a really long time, and simply include a break if my requirements are met. What would be a better way to achieve this?

t=0

i=0

for r in range(0,i):

    print(r)

    if par_y(t)>=0:

        i=+1

print(par_y(t))

t=+0.25

#or:

l=list(range(0,1)

t=0

for r in l:

    print(r)

    if par_y(t)>=0:

        [l]=0    

    print(par_y(t))  

    t=+0.25
prosoitos
  • 6,679
  • 5
  • 27
  • 41
Maddin
  • 1

1 Answers1

0

I think the code you are looking for is

while(condition == False):

    ##your code here
RickyHamm
  • 43
  • 6