Break, Continue, & Pass Statement in Python
Uses for pass
when drafting structure of code......
when do we use break, continue, or pass statements
to control the flow of loops
Continue Statement
continue is used to skip the rest of the current iteration and move directly to the next iteration of the loop
Pass
Acts as a placeholder and does nothing- allows you to maintain the structure of your code without having any operational statements
Use cases
When you want to stop the loop as soon as a specific condition is met
break, continue, and/or pass
control flow statements
break
used to exit out of the enclosing loop (either for or while loop)
Continue Uses
when you want to avoid executing certain parts of the loop for specific conditions, but not the whole loop