Difference between break and continue in Python
(1) With the break statement we can stop the loop even if the while condition is true:
Exit the loop when i is 3:
i = 1while i < 6: print(i) if i == 3: break i += 1
o/p :
1
2
3
(2) With the continue statement we can stop the current iteration, ...
pythonchallenge.hashnode.dev1 min read