(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/simple.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/simple.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/assert.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 6. Simple statements Up: 6. Simple statements Next: 6.2 Assert statements
6.1 Expression statements
Expression statements are used (mostly interactively) to compute and write a value, or (usually) to call a procedure (a function that returns no meaningful result; in Python, procedures return the value None). Other uses of expression statements are allowed and occasionally useful. The syntax for an expression statement is:
expression_stmt: expression_list
An expression statement evaluates the expression list (which may be a single expression).
In interactive mode, if the value is not None, it is converted to a string using the built-in repr() function and the resulting string is written to standard output (see section 6.6) on a line by itself. (Expression statements yielding None are not written, so that procedure calls do not cause any output.)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/simple.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/simple.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/assert.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 6. Simple statements Up: 6. Simple statements Next: 6.2 Assert statements
See About this document... for information on suggesting changes.