A parameter can be given a default value in the function definition with name=value. If the caller supplies an argument for it, that argument is used; if not, the default is used. This lets one function serve both simple and detailed calls, and it lets you add new options to an existing function without breaking the calls that already use it. print() itself works this way: sep defaults to a space and end to a newline, which is why print("a", "b") shows a b and moves to a new line unless you say otherwise.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.