
In chapter 4.4 of the python tutorial ( http://docs.python.org/tutorial/controlflow.html#break-and-continue-statemen... ), the second example reads:
for num in range(2, 10):... if x % 2 == 0:... print("Found an even number", num)... continue... print("Found a number", num)Found an even number 2Found a number 3Found an even number 4Found a number 5Found an even number 6Found a number 7Found an even number 8Found a number 9
The x in line 2 should be replaced by num. best regards, Øystein R. Solheim

Fixed. Thank you for the report Eli On Fri, Aug 17, 2012 at 12:01 PM, Øystein Rognes Solheim < oystein.rognes.solheim@gmail.com> wrote:
In chapter 4.4 of the python tutorial ( http://docs.python.org/tutorial/controlflow.html#break-and-continue-statemen... ), the second example reads:
for num in range(2, 10):... if x % 2 == 0:... print("Found an even number", num)... continue... print("Found a number", num)Found an even number 2Found a number 3Found an even number 4Found a number 5Found an even number 6Found a number 7Found an even number 8Found a number 9
The x in line 2 should be replaced by num.
best regards, Øystein R. Solheim
_______________________________________________ docs mailing list docs@python.org http://mail.python.org/mailman/listinfo/docs
participants (2)
-
Eli Bendersky
-
Øystein Rognes Solheim