747 B
747 B
title | tags | aliases | |||||
---|---|---|---|---|---|---|---|
statements |
|
|
[!note] Concept
A statement performs an action. It could assign a value, call a function, define something, or control flow.[!example] Examples
x = 10 # assignment statement print("Hello") # function call statement if x > 5: # control statement print(x)
[!important] Statement vs Expression
- An expression evaluates to a value.
- A statement does something — it doesn’t always return a value.
[!info] Related Notes
expressions
functions
conditionals
pythonSyntaxOverview