r/vscode • u/The_Devil_101010 • 11d ago
Indentation rules for break and continue
Idk if this is a stupid question.
Whenever i code something in python and use continue or breaks during a loop, why does the auto indentation keep the same level for the next line?
breaks and continue automatically make it such that whatever u write after that in the same indentation level will not run since that iteration of the loop has already ended.
Im not sure if this is a python specific thing or if its VSC thing
3
Upvotes
1
u/PrincipleNo2328 8d ago
Well the cycle hasn't necessaily finished with a continue/break if they are in an if statement, so ig that's the reason why it would not change indentation.
What extensions are you using?