When using nested loops, the break statement will exit the _______ loop.
- Current
- Inner
- Outer
- Parent
The 'break' statement in Python is used to exit the innermost loop when used in nested loops. It terminates the loop in which it is placed, hence exiting the 'Inner' loop.
Loading...
Related Quiz
- The ____ decorator is used to convert a function into a static method.
- The ____ keyword is used to create a new variable and assign it a specific data type.
- In the context of nested loops, how does the break statement operate?
- How would you enable Cross-Origin Resource Sharing (CORS) in a Flask application?
- How can you create an else block that executes after a for loop, but only if the loop completed normally (i.e., did not encounter a break statement)?