16. Lektion: Funktionen.extend(): Unterschied zwischen den Versionen

Aus Attraktor Wiki

Wechseln zu: Navigation, Suche
(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>")
 
(Funktionen)
Zeile 5: Zeile 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/

Version vom 20. August 2023, 08:13 Uhr

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