I\'ve noticed the following code is legal in Python. My question is why? Is there a specific reason?
n = 5 while n != 0: print n n -= 1 else: pri
The else: statement is executed when and only when the while loop no longer meets its condition (in your example, when n != 0 is false).
else:
n != 0
So the output would be this:
5 4 3 2 1 what the...