In the python tutorial is an example (copied below), shouldn't else
be indented? I ran the code and it didn't work but I indented it (else
) and it worked. Is, what I am saying right? If the documentation is wrong, then how do I report it as a bug to python doc guys?
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, 'equals', x, '*', n/x
... break
... else:
... # loop fell through without finding a factor
... print n, 'is a prime number'
...