mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Convert all print statements in the docs.
This commit is contained in:
parent
c9879246a2
commit
6911e3ce3f
71 changed files with 351 additions and 388 deletions
|
@ -325,7 +325,7 @@ available. They are listed here in alphabetical order.
|
|||
``(1, seq[1])``, ``(2, seq[2])``, .... For example::
|
||||
|
||||
>>> for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter')]:
|
||||
>>> print i, season
|
||||
>>> print(i, season)
|
||||
0 Spring
|
||||
1 Summer
|
||||
2 Fall
|
||||
|
@ -350,7 +350,7 @@ available. They are listed here in alphabetical order.
|
|||
the evaluated expression. Syntax errors are reported as exceptions. Example::
|
||||
|
||||
>>> x = 1
|
||||
>>> print eval('x+1')
|
||||
>>> eval('x+1')
|
||||
2
|
||||
|
||||
This function can also be used to execute arbitrary code objects (such as those
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue