+ 1

Python statements

the syntax for a if clause in python is: if condition: now there are no { } like in other languages that define where the code-block starts and where it stops, how do I know which code is executed and which is not

28th Jan 2017, 1:43 PM
Daniel S
Daniel S - avatar
2 Respostas
+ 1
colon after the condition and indentation for the inner statements is the answer
28th Jan 2017, 2:07 PM
Israel
Israel - avatar
+ 1
python use indentation for this.
28th Jan 2017, 4:28 PM
Jhonnatha Andrade
Jhonnatha Andrade - avatar