A function call is easier to use when its inputs have a clear contract. A positional parameter receives an argument according to where that argument appears in the call. In a function definition, parameters name the inputs; at the call site, arguments supply their values. section 3.1.2
def full_name(fname, mname, lname):
return f"{fname} {mname} {lname}"
The names in this definition make the expected inputs and their order visible: first name, middle name, then last name. section 3.2.2
Order matters at the call site
Calling full_name("John", "James", "Smith") assigns each string to the corresponding parameter in definition order. Supplying all three by name instead permits a different order, such as full_name(mname="James", lname="Smith", fname="John"). In this definition, omitting a required value raises TypeError. section 3.2.2
Choose the interface to fit the job. Required inputs can be positional; inputs with defaults can be optional keyword parameters. Python’s print function illustrates the combination: it accepts multiple objects to display while offering named settings such as sep and end. Clear input choices make a small function useful without requiring a separate function for every variation. section 3.1.2 section 3.2.2




