Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| modul:m323:learningunits:lu02:purefunctions [2024/08/28 08:33] – kmaurizi | modul:m323:learningunits:lu02:purefunctions [2025/11/17 13:37] (aktuell) – alte Version wiederhergestellt (2025/11/13 09:57) kmaurizi | ||
|---|---|---|---|
| Zeile 63: | Zeile 63: | ||
| if __name__ == ' | if __name__ == ' | ||
| - | print(' | + | print(' |
| - | modify_list() | + | |
| - | print(' | + | print(' |
| + | print(' | ||
| </ | </ | ||
| Zeile 75: | Zeile 76: | ||
| <code python> | <code python> | ||
| - | def append_to_list(some_list): | + | def append_to_list(some_list, append): |
| """ | """ | ||
| - | Appends the value 5 to the passed list. | + | Appends the value '' |
| """ | """ | ||
| - | some_list.append(5) | + | some_list.append(append) |
| + | | ||
| if name == ' | if name == ' | ||
| - | my_list = [1, 2, 3] | + | |
| - | print(' | + | print(' |
| - | append_to_list(my_list) | + | append_to_list(my_list,5) |
| - | print(' | + | print(' |
| </ | </ | ||
| Zeile 102: | Zeile 104: | ||
| ---- | ---- | ||
| - | {{tag> | + | {{tag> |
| [[https:// | [[https:// | ||