diff --git a/Tutorium/tut11/README.md b/Tutorium/tut11/README.md index e1b4220..b0ef6f8 100644 --- a/Tutorium/tut11/README.md +++ b/Tutorium/tut11/README.md @@ -13,8 +13,45 @@ Dictionary, List-Comprehensions, Funktionen als Objekte --- -# Dictionary +## Dictionary - Eine Ansammlung aus **Keys** und dessen **Werten** - Ordnet jedem **Key** einen **Wert** zu -- +- Ein **Key** muss **immutable** sein, also keine `list`, `Objects`, ... +- **Werte** können mutable sein, also eigentlich alles. + +--- + +### Creating a Dictionary + +```python +dictionary = { + : , + : , + ... + : +} +``` + +--- + +### Creating a Dictionary + +```python +dictionary = { + : , + : , + ... + : +} +``` + +#### Beispiel + +```python +courses = { + "eidp": ["np163", "az34", "jf334"], + "mathe": ["aw331", "pl67"], + "sdp": [] +} +``` \ No newline at end of file