Software Development

Explain expressions and statements

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

An expression is anything that results in a value (even if the value is None). Basically, any sequence of literals so, you can say that a string, integer, list, ... are all expressions.

Statements are instructions executed by the interpreter like variable assignments, for loops and conditionals (if-else).