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.

Level: beginnerTopic: Python core

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.