Is it necessary for the break statement to be indented twice? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Is it necessary for the break statement to be indented twice?

Indented twice: Once for loop and Secondly for the if statement.

8th May 2019, 3:02 AM
Dark_Fury
Dark_Fury - avatar
2 Answers
+ 10
You did not specify programming language so I assume you're using python. If you're using python then every indentation is necessary. But if you're using any other language like C++, Java etc then it not compulsory but still it is good practice to indent things properly in a code to make it more readable.
8th May 2019, 3:05 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
Affirmative m'lady
17th May 2019, 3:25 AM
chadsprinkles37
chadsprinkles37 - avatar