Function Flexibility
Look at the print
function's argument list.
print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
You will notice two things. One is that there is a * in front of the first argument. Following that, you will see several keyword arguments with default values. Immedately, you might ask two questions.
- What does the * mean in front of
objects
? - Can I make functions with keywords arguments
We will address these two items today.
Keyword Arguments
Starguments
ORDER!!!
Arguments must occur in this order. Failure to honor this convention is fatal.
- positional
- ONE stargument
- keyword arguments(s)