AI engineering glossary · Python core
What is statement?
Statement: A complete instruction that Python executes to perform an action, such as an assignment, an if block, a loop, an import or a return. Unlike an expression, a statement does not itself produce a value that can be used inside another expression.
Statement: an example
x = 5, import math and for i in range(3): are each statements; you cannot write y = (import math).
Related terms
More Python core terms
Where you learn it
Statement is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.