expression

expression

April 4, 2022 | computer-science, permanent

Summary #

An expression evaluates to a value.

expression vs statement #

Though this isn’t related to Python:

An expression evaluates to a value. A statement does something.

>>> x + 2 # an expression >>> x = 1 # a statement >>> y = x + 1 # a statement >>> print y # a statement (in 2.x) 2

more good answers here #


No notes link to this note