16. Lektion: Funktionen.extend(): Difference between revisions
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
===== | === Funktionen=== | ||
==== Mehrere Ergebnisse zurückgeben==== | |||
<pre> | <pre> | ||
>>> def test1(a, b): | >>> def test1(a, b): | ||
| Line 11: | Line 11: | ||
>>> y | >>> y | ||
42 | 42 | ||
>>> </pre> | >>> | ||
</pre> | |||
==== Positions- oder Schlüsselwortargumente==== | |||
** https://realpython.com/python-asterisk-and-slash-special-parameters/ | ** https://realpython.com/python-asterisk-and-slash-special-parameters/ | ||
** https://medium.com/@mr.stucknet/a-roadmap-to-python-parameter-definitions-best-practices-and-beyond-6faa2f66fc19 | ** https://medium.com/@mr.stucknet/a-roadmap-to-python-parameter-definitions-best-practices-and-beyond-6faa2f66fc19 | ||
=== Zufallszahlen=== | |||
** random | ** random | ||
** https://www.phyton-lernen.de/zufallszahlen-random.htm | ** https://www.phyton-lernen.de/zufallszahlen-random.htm | ||
Revision as of 16:55, 1 October 2023
Funktionen
Mehrere Ergebnisse zurückgeben
>>> def test1(a, b):
return a, b
>>> x, y = test1(3.14, 42)
>>> x
3.14
>>> y
42
>>>
Positions- oder Schlüsselwortargumente
Zufallszahlen
Zurück zu Micropython Kurs 2023 - Teil 1
Zurück zur "Micropython Kurs 2023" Startseite
Zurück zur Programmieren Startseite
Zurück zur Wiki Startseite