For with {} and without | Sololearn: Learn to code for FREE!


For with {} and without

Ive seen people use the for loop with {} and ive seen people use it without what does it change if u put it or not (the "{}" i mean)

9/5/2018 7:32:32 PM


3 Answers

New Answer


without braces i believe you can only have one statement inside the loop


no braces (on non indentation based languages such as python) will allow you to have one statement just as hinanawi stated take a look at this (short) article:


thanks to both of you