=
, is a name. To the right of the assignment token is an expression which is evaluated by the Python interpreter and then assigned to the name. The difference between the left and right hand sides of the assignment statement is often confusing to new programmers. In the following assignment:n
plays a very different role on each side of the =
. On the right it is a value and makes up part of theexpression which will be evaluated by the Python interpreter before assigning it to the name on the left.=
is Python’s assignment token, which should not be confused with the mathematical comparison operator using the same symbol.int
), floating-point numbers (float
), and strings (str
).float
s, and remember that they are only approximate values.if
, def
, and while
as variable names.import
statement and the for
statement.