Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

*args und **kwargs

def my_func(normal_arg, *args, **kwargs):
    print("Stinknormaler Funktionsparameter:", normal_arg)

    for arg in args:
        print("Funktionsparameter als Liste:", arg)
        
    for keyword, arg in kwargs.items():
        print("Funktionsparameter als Dictionary:", keyword, arg)
Output

Wichtig ist nicht der Name sondern die * & **