6. Simple statements
Keywords: ref

#
6. Simple statements

Simple statements are comprised within a single logical line. Several simple statements may occur on a single line separated by semicolons. The syntax for simple statements is:

  `simple_stmt` | ::= | `expression_stmt`
  |  | `| assert_stmt`
  |  | `| assignment_stmt`
  |  | `| augmented_assignment_stmt`
  |  | `| pass_stmt`
  |  | `| del_stmt`
  |  | `| print_stmt`
  |  | `| return_stmt`
  |  | `| yield_stmt`
  |  | `| raise_stmt`
  |  | `| break_stmt`
  |  | `| continue_stmt`
  |  | `| import_stmt`
  |  | `| global_stmt`
  |  | `| exec_stmt`

  Download entire grammar as text.

Subsections

- 6.1 Expression statements
- 6.2 Assert statements
- 6.3 Assignment statements
  - 6.3.1 Augmented assignment statements
- 6.4 The `pass` statement
- 6.5 The `del` statement
- 6.6 The `print` statement
- 6.7 The `return` statement
- 6.8 The `yield` statement
- 6.9 The `raise` statement
- 6.10 The `break` statement
- 6.11 The `continue` statement
- 6.12 The `import` statement
- 6.13 The `global` statement
- 6.14 The `exec` statement