What are keyword-only and positional-only parameters?
Model answer
Parameters after a bare * must be passed by name: def f(a, *, b). Parameters before / must be positional: def f(a, /, b). They make APIs clearer and let you change parameter names later without breaking callers.
Learn this topic
Functions in Python: def, Arguments and return in the course Python for Beginners: Learn to Code with Real Projects.
Sign in to add your own answer.