diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 4c10eb80ff2..4fa9858765d 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -138,9 +138,9 @@ following loop, which searches for prime numbers:: ... 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' + ... else: + ... # loop fell through without finding a factor + ... print n, 'is a prime number' ... 2 is a prime number 3 is a prime number