16. Lektion: Funktionen.extend(): Difference between revisions

From Attraktor Wiki
Jump to navigation Jump to search
Created page with "===== Funktionen===== * Benannte Parameter * Mehrere Ergebnisse zurückgeben <pre>def test1(a, b): return a, b</pre> <pre>x, y = test1(23, 45)</pre>"
 
Line 5: Line 5:
     return a, b</pre>
     return a, b</pre>
<pre>x, y = test1(23, 45)</pre>
<pre>x, y = test1(23, 45)</pre>
* you can pass positional or keyword arguments to your functions.
** https://realpython.com/python-asterisk-and-slash-special-parameters/

Revision as of 09:13, 20 August 2023

Funktionen
  • Benannte Parameter
  • Mehrere Ergebnisse zurückgeben
def test1(a, b):
    return a, b
x, y = test1(23, 45)