0

Is it necessary to give a space before print function that comes after if statement ?

C=1 If C<=3 : Print(‘true’) Why there should be a space before print statement ?

9th Jul 2022, 10:33 AM
Hari Govind
2 Answers
+ 7
Hari Govind , you can learn all things like this in the python tutorials. start with "python for beginners" btw: indentation should be 4 spaces for each indentation level. if you have NO indentation in the line after if..., nothing is printed, but you get an IndentationError exception if ... and print() has to be in lower case
9th Jul 2022, 11:02 AM
Lothar
Lothar - avatar
+ 1
yes, indentation is important especially for a language like python, if you don't indent it will print it even if C is greater than 3
9th Jul 2022, 10:43 AM
Mafdi
Mafdi - avatar