Rather than being evaluated, statements are executed. Each statement
describes some change to the interpreter state, and executing a statement
applies that change. As we have seen for return and assignment statements,
executing statements can involve evaluating subexpressions contained within
them.
If you want to change selection, open document below and click on "Move attachment"
1.5 Controlow to evaluate expressions. However, we
have seen three kinds of statements already: assignment, def , and
return statements. These lines of Python code are not themselves
expressions, although they all contain expressions as components.
<span>Rather than being evaluated, statements are executed. Each statement
describes some change to the interpreter state, and executing a statement
applies that change. As we have seen for return and assignment statements,
executing statements can involve evaluating subexpressions contained within
them.
Expressions can also be executed as statements, in which case they are
evaluated, but their value is discarded. Executing a pure function has no
effect, but executing a non-pure funct Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details