Expressions

Expressions are combinations of values, variables and operators. Expressions are evaluated by the Python interpreter. An expression can be a single value, a variable or a combination of values, variables and operators.

The following example shows a single value being used as an expression:

print(42)
# > 42

The following example shows a variable being used as an expression:

my_variable = 42
print(my_variable)
# > 42

The following example shows a combination of values, variables and operators being used as an expression:

print(42 + 1)
# > 43