AI engineering glossary · Python core

What is keyword argument?

Keyword argument: An argument passed with the parameter name, in the form name=value, so its position does not matter. It makes calls self-explanatory and lets you skip parameters that have defaults. Keyword arguments improve readability when a function has many optional parameters.

Level: beginnerTopic: Python core

Keyword argument: an example

divide(b=2, a=10) gives 5.0, and print('x', end='') uses the keyword argument end.

Related terms

More Python core terms

Where you learn it

Keyword argument is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.