| Python Language Reference Manual by Guido van Rossum and Fred L. Drake, Jr. Paperback (6"x9"), 120 pages ISBN 0954161785 RRP £12.95 ($19.95) Sales of this book support the Python Software Foundation! Get a printed copy>>> |
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_stmtexpression_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.)
| ISBN 0954161785 | Python Language Reference Manual | See the print edition |