mirror of
https://github.com/python/cpython.git
synced 2026-03-23 21:20:45 +00:00
Use 2.x "print" syntax for this example.
This commit is contained in:
parent
b704eab599
commit
8a0d58bb3d
1 changed files with 3 additions and 2 deletions
|
|
@ -168,9 +168,9 @@ iteration of the loop::
|
|||
|
||||
>>> for num in range(2, 10):
|
||||
... if num % 2 == 0:
|
||||
... print("Found an even number", num)
|
||||
... print "Found an even number", num
|
||||
... continue
|
||||
... print("Found a number", num)
|
||||
... print "Found a number", num
|
||||
Found an even number 2
|
||||
Found a number 3
|
||||
Found an even number 4
|
||||
|
|
@ -180,6 +180,7 @@ iteration of the loop::
|
|||
Found an even number 8
|
||||
Found a number 9
|
||||
|
||||
|
||||
.. _tut-pass:
|
||||
|
||||
:keyword:`pass` Statements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue