pytutorial/python_basics/flow_control_overview/README.md
David Rotermund bbdee814a3
Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
2023-12-06 23:24:12 +01:00

45 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Flow Control Overview
{:.no_toc}
<nav markdown="1" class="toc-class">
* TOC
{:toc}
</nav>
## The goal
Let us look what kind of options we have for flow control in Python.
Questions to [David Rotermund](mailto:davrot@uni-bremen.de)
**Logic blocks need to be indented.**
**Preferable with 4 spaces!**
There is called a so called [The Python Language Reference](https://docs.python.org/3/reference/index.html)
|Selection statements|
|---|
|[if, elif, else](https://docs.python.org/3/reference/compound_stmts.html#the-if-statement)|
|[match case (>= Python 3.10)](https://docs.python.org/3/reference/compound_stmts.html#the-match-statement)|
|Iteration statements (Loops)|
|---|
|[for loop](https://docs.python.org/3/reference/compound_stmts.html#the-for-statement)|
|[while loop](https://docs.python.org/3/reference/compound_stmts.html#the-while-statement)|
|Functions|
|---|
|[functions](https://docs.python.org/3/reference/compound_stmts.html#function-definitions)|
|[return](https://docs.python.org/3/reference/simple_stmts.html#the-return-statement)|
|[lambda](https://docs.python.org/3/reference/expressions.html#lambda)|
|Jump statements|
|---|
|[break](https://docs.python.org/3/reference/simple_stmts.html#the-break-statement)|
|[continue](https://docs.python.org/3/reference/simple_stmts.html#the-continue-statement)|
|[pass](https://docs.python.org/3/reference/simple_stmts.html#the-pass-statement)|
|Error handling|
|---|
|[try](https://docs.python.org/3/reference/compound_stmts.html#the-try-statement)|