next up previous contents index
Next: Assignment statements Up: Simple statements Previous: Simple statements

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):

expression_stmt: condition_list

An expression statement evaluates the condition list (which may be a single condition).   

In interactive mode, if the value is not None, it is converted to a string using the rules for string conversions (expressions in reverse quotes), and the resulting string is written to standard output (see section gif) on a line by itself. (The exception for None is made so that procedure calls, which are syntactically equivalent to expressions, do not cause any output.)                



guido@cwi.nl