+ 3
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)
3 Answers
+ 8
without braces i believe you can only have one statement inside the loop
+ 5
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:
https://medium.com/@jonathanabrams/single-line-if-statements-2565c62ff492
+ 1
thanks to both of you