About 451,000 results
Open links in new tab
  1. Example use of "continue" statement in Python? - Stack Overflow

    Jul 17, 2018 · 19 Usually the situation where continue is necessary/useful, is when you want to skip the remaining code in the loop and continue iteration. I don't really believe it's necessary, …

  2. if statement - if pass and if continue in python - Stack Overflow

    There is a fundamental difference between pass and continue in Python. pass simply does nothing, while continue jumps to the next iteration of the for loop. The statement if not 0 always …

  3. Is there a difference between "pass" and "continue" in a for loop in ...

    Is there any significant difference between the two Python keywords continue and pass like in the examples for element in some_list: if not element: pass and for element in some_list: ...

  4. python - Is the continue statement necessary in a while loop?

    That's because when python sees continue, it skips the rest of the while suite and starts over from the top. You won't see 'horse' or 'cow' either because when 'horse' is seen, we encounter the …

  5. python - What does the continue statement do? - Stack Overflow

    The continue command restarts the innermost loop at the condition. That means after x reaches 33, x += 1 will never execute because you will be hitting the continue and going back to the …

  6. python - Difference between if: else: and if: continue - Stack …

    Aug 7, 2019 · 0 The only connection between continue and if is that you usually have a condition to decide if you want to continue. continue is used to end a single iteration of a loop, such as …

  7. How to continue in nested loops in Python - Stack Overflow

    Feb 12, 2013 · How can you continue the parent loop of say two nested loops in Python? for a in b: for c in d: for e in f: if somecondition: <continue the for a in b lo...

  8. Python: Continuing to next iteration in outer loop

    I wanted to know if there are any built-in ways to continue to next iteration in outer loop in python. For example, consider the code: for ii in range(200): for jj in range(200, 400): ...

  9. Continue statement in while loop python - Stack Overflow

    Apr 22, 2020 · The continue statement in Python returns the control to the beginning of the current loop. When encountered, the loop starts next iteration without executing the remaining …

  10. python - Break And Continue Statement in nested loops - Stack …

    Jul 7, 2021 · So i was experimenting the for-loop in Python and i decided let me use continue and break statements for experimentation and i got to know what's the difference.