Message369014
The tutorial code for Continue at https://docs.python.org/3.7/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops is missing a
...
null statement.
Actual code/result:
>>> for num in range(2, 10):
... if num % 2 == 0:
... print("Found an even number", num)
... continue
... print("Found a number", num)
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9
Expected code/result:
>>> for num in range(2, 10):
... if num % 2 == 0:
... print("Found an even number", num)
... continue
... print("Found a number", num)
...
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9 |
|
Date |
User |
Action |
Args |
2020-05-16 06:02:21 | Chas Belov | set | recipients:
+ Chas Belov, docs@python |
2020-05-16 06:02:21 | Chas Belov | set | messageid: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> |
2020-05-16 06:02:21 | Chas Belov | link | issue40640 messages |
2020-05-16 06:02:21 | Chas Belov | create | |
|