AI engineering glossary · Python core
What is default argument?
Default argument: A parameter given a value in the function definition that is used when the caller omits it. Defaults make parameters optional. They are evaluated once, when the function is defined.
Default argument: an example
def greet(name, greeting='Namaste'): return f'{greeting}, {name}'. greet('Ravi') uses the default 'Namaste'.
Related terms
More Python core terms
Where you learn it
Default 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.