Post

@PythonPr In Python, indentation defines the block.
First example runs because print() is inside the if.
Second fails (IndentationError) because the block isn’t indented.
Whitespace = syntax in Python.
English

@PythonPr On the top one the print statement is indented properly and will only run if the if check returns true. The bottom one will print it no matter if the if check is true because the indentation makes it not under the if statement.
English

@PythonPr One space can decide whether your code works or breaks 😄
Indentation matters in Python.
English

@PythonPr code is correct but python follows indentation hence will through error
English

@PythonPr The second version will print Positive, unconditionally condition is true or false
English

@PythonPr much like the 3 days I spent in MUMPS looking for a single missing period, it is in the indention.
English

@PythonPr The second code doesn't have indentation in the third line.
English

@PythonPr In python indentation error is very common,so in the 2nd code print is not correctly present.
English



























