>>> x = 1>>> y = 1>>> z = (x == y)>>> print zTrue>>>
n = 1while n <= 20: if n % 2 == 0: print n n = n + 1print "there, done."The fact that the third, forth and fifth lines are indented shows that they belong to the while block, i.e. they are the commands to be executed while the expression in the while statement holds. Similarly, the double indentation of the "print n" line shows that it belongs the if statement above it (and that the "n = n + 1" line doesn't). Most other languages use braces to surround blocks instead.
>>> x = 1>>> y = 1>>> z = (x == y)>>> print zTrue>>>
n = 1 while n <= 20: if n % 2 == 0: print n n = n + 1 print "there, done."The fact that the third, forth and fifth lines are indented shows that they belong to the while block, i.e. they are the commands to be executed while the expression in the while statement holds. Similarly, the double indentation of the "print n" line shows that it belongs the if statement above it (and that the "n = n + 1" line doesn't). Most other languages use braces to surround blocks instead.