AI engineering glossary · Python core
What is positional argument?
Positional argument: An argument matched to a parameter by its order in the call. Changing the order changes which parameter receives which value. Positional arguments must come before keyword arguments. Mixing up the order silently gives wrong results, so it is safest with few parameters.
Positional argument: an example
For def divide(a, b), divide(10, 2) gives 5.0 but divide(2, 10) gives 0.2.
Related terms
More Python core terms
Where you learn it
Positional 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.