[Tutor] difference between expressions and statements
dyoo at hashcollision.org
Wed Apr 9 21:04:42 CEST 2014
> Could someone explain the difference between expressions and statements?
> I know that expressions are statements that produce a value.
Yes, that's pretty much it. If you can point your finger at the thing
and say that it produces a value, it's an expression.
> Are any of the following expressions?
> spam = 42
Technically, the only things that count as expressions have to fit the
shape of something described in that documentation link.
Your question about assignment being an expression or not is something
you can find out by seeing where "Assignment statements" show in:
More information about the Tutor