expression

A piece of code that Python can evaluate to produce a value, such as 2 + 3, name or len(word).

In more detail

Anywhere a value is expected, including as an argument to a function, you can write any expression. The shell shows the value of an expression you type. A statement, by contrast, does something, such as assignment, and does not itself have a value.

Related terms

Taught in

References

Certification courses