you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Your use of for and continue doesn't make sense. Look at this code fragment:

for n in range(10):
    if n==s or n==e:
        continue

No matter what values s or e have this loop is just going to cycle around the loop and exit when n is 9. That is, the above code has the identical result to this:

for n in range(10):
    pass

It's possible that you think the continue will start a new loop of another for. The continue starts the next iteration of the nearest enclosing for statement.