Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
modul:m323:learningunits:lu02:purefunctions [2024/08/28 08:54] – [Beispiel 2] kmaurizi | modul:m323:learningunits:lu02:purefunctions [2024/08/28 08:55] (aktuell) – [Beispiel 3] kmaurizi | ||
---|---|---|---|
Zeile 76: | 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] | my_list = [1, 2, 3] | ||
print(' | print(' | ||
- | append_to_list(my_list) | + | append_to_list(my_list,5) |
print(' | print(' | ||
</ | </ |