0

in py3

why when write statment after while or if we must do lagre space and write statment plz ?

17th Aug 2019, 7:16 PM
Mohammed Hassan
Mohammed Hassan - avatar
1 Odpowiedź
+ 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).
17th Aug 2019, 8:10 PM
Seb TheS
Seb TheS - avatar