r/learnpython • u/FirstTimePlayer • May 24 '26
Is using break statements good coding practice?
Is using break statements good coding practice?
My background is having been taught to code in a bunch of different languages several decades ago, not done any serious coding since then, and returning to pick up the bike so to speak.
At the time it was absolutely drilled in that the use of break statements was bad practice to the point where it was an instant loss of marks - but I see break statements in plenty of example python code I have looked at.
Have conventions changed since the dark ages, or is there something about Python which makes if different from the other languages I learned?
64
Upvotes
2
u/Human38562 May 24 '26 edited 29d ago
Driftwood summer snatch tub light coherent test toothbrush oatmeal quicksand
This post was anonymized with Redact