continue forces the loop to start at the next iteration. In short, continue will jump back to the top of the loop
a = [0, 1, 2] for element in a: if not element: continue print(element)
UseCase: The continue statement can be used to skip the current iteration only. Loop does not terminate but continues on with the next iteration.
while pass means there is no code to execute here, it passes execution to the next statement. So pass will continue processing.
a = [0, 1, 2] for element in a: if not element: pass print(element)
0 1 2
UseCase: You can use pass statement when you have created a method but have not implemented, yet.
The break statement provides you with the opportunity to exit out of a loop when a given condition is triggered.
a = [0, 1, 2, 3, 4, 5] for element in a: if element == 3: break print(element)
0 1 2
UseCase: The break statement can use in a program to break out of a loop for the matching condition.
Throughout the last year, I have worked part-time as a working student and also studied at the university. I was not the first and not the last one who has combined that during their studies, but the problem for me was, that at the end of the day I have felt absolutely exhausted mentally and physically. That caused problems with my health and motivation to continue working on my goals or anything. (yeah, “goals,” I wish I had something more specific at that time).