voidex/20-29 Areas/20 Programming/20.01 Python/statements.md

747 B
Raw Permalink Blame History

title tags aliases
statements
python
statements
syntax
statement
code-line

[!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 doesnt always return a value.

[!info] Related Notes
expressions
functions
conditionals
pythonSyntaxOverview