Values, Types, Variable Names, and Keywords
Read these examples of using the 'print' and 'type' functions. You can also try to use them in the Repl.it command line.
An expression is a combination of values, variables, and operators. A value all by itself is considered an expression, and so is a variable, so the following are all legal expressions (assuming that the variable x
has been assigned a value):
17 x x + 17
A statement is a unit of code that the Python interpreter can execute. We have seen two kinds of statements: print and assignment.
Technically an expression is also a statement, but it is probably simpler to think of them as different things. The important difference is that an expression has a value; a statement does not.