801 B
801 B
Expression Statements
Expression statements are used (mostly interactively) to compute and write a value, or (usually) to call a method (a function that does not return a meaningful result; in Python, methods return the value None ). Other uses of expression statements are allowed and occasionally useful. The syntax for an expression statement is:
expression_stmt ::= starred_expression
An expression statement evaluates the list of expressions (which can be a single expression).
In interactive mode, if the value is not None , it is converted to a string using the built-in function repr() , and the resulting string is written to the standard output on a line by itself (except if the result is None , in which case the called procedure produces no output).