Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://docs.python.org/reference/expressions.html" rel="noreferrer">Expressions</a> only contain <a href="http://docs.python.org/release/2.5.2/ref/identifiers.html" rel="noreferrer">identifiers</a>, <a href="http://docs.python.org/release/2.5.2/ref/literals.html" rel="noreferrer">literals</a> and <a href="http://docs.python.org/release/2.5.2/ref/operators.html" rel="noreferrer">operators</a>, where operators include arithmetic and boolean operators, the function <a href="https://docs.python.org/3/reference/expressions.html?highlight=subscriptions#calls" rel="noreferrer">call operator</a> <code>()</code> the <a href="https://docs.python.org/3/reference/expressions.html?highlight=subscriptions#grammar-token-subscription" rel="noreferrer">subscription operator</a> <code>[]</code> and similar, and can be reduced to some kind of "value", which can be any Python object. Examples:</p> <pre><code>3 + 5 map(lambda x: x*x, range(10)) [a.x for a in some_iterable] yield 7 </code></pre> <p>Statements (see <a href="http://docs.python.org/reference/simple_stmts.html" rel="noreferrer"><a href="https://docs.python.org/3/reference/expressions.html?highlight=subscriptions#calls" rel="noreferrer">1</a></a>, <a href="http://docs.python.org/reference/compound_stmts.html" rel="noreferrer"><a href="https://docs.python.org/3/reference/expressions.html?highlight=subscriptions#grammar-token-subscription" rel="noreferrer">2</a></a>), on the other hand, are everything that can make up a line (or several lines) of Python code. Note that expressions are statements as well. Examples:</p> <pre><code># all the above expressions print 42 if x: do_y() return a = 7 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload