For example, if one defines a function as def f(x): … , then x is the parameter , and if it is called by a = …; f(a) then a is the argument. A parameter is an (unbound) variable, while the argument can be a literal or variable or more complex expression involving literals and variables.
What is function parameter with example?
For example, if one defines a function as def f(x): … , then x is the parameter , and if it is called by a = …; f(a) then a is the argument. A parameter is an (unbound) variable, while the argument can be a literal or variable or more complex expression involving literals and variables.