0
in py3
why when write statment after while or if we must do lagre space and write statment plz ?
1 Resposta
+ 2
It's not necessary.
You can also use a short statement like this:
if condition: statement
while condition: statement
But when it is necessary, it's to specify, which code is wanted to belongs to the statements. That Python uses indenting instead of curly braces is just a rule created by someone(s).