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

    The definition of the continue statement is: The continue statement continues with the next iteration of the loop. I can't find any good examples of code. Could someone suggest some …

  2. 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: ...

  3. 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 …

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

    I'm confused about the use of the continue statement in a while loop. In this highly upvoted answer, continue is used inside a while loop to indicate that the execution should continue …

  5. python - Why is continue not working? - Stack Overflow

    Jan 3, 2014 · continue returns the flow of execution back to the top of the loop for another iteration. It does not continue the same iteration the loop. If you were to remove the continue …

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

    Aug 7, 2019 · There's no difference in how the code works. continue is basically the same as putting everything below in else. But if that else part is long or uses a lot of indentation levels, …

  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. Catch exception and continue try block in Python

    Catch exception and continue try block in Python Asked 12 years, 1 month ago Modified 2 years, 1 month ago Viewed 553k times

  9. 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 …

  10. How to use "continue" in single line if esle within a for loop

    Aug 30, 2019 · X if C else Y is an expression. continue is a statements. Expressions in Python cannot contain statements. Transform your if expression into an if statement to fix.