Python break nested loop | Example code

Nested looop contain the multiple loops, Using a break statement only break the inner loop, it only exits from the inner loop and the outer loop still continues. But we can use else block with continue keyword or flag variable to break nested loop in Python. Example breaking only inner loop. Output: 1 B1 C2 Read More…