The print() function - the keyword arguments
And now it's time to try something more difficult.
If you look carefully, you'll se that we've used the end argument, but the string assigned to it is empty (it contains no characters at all).
What will happen now? Run the program in the editor to find out.
As the end argument has been set to nothing, the print() function outputs nothing too, once its positional arguments have been exhausted.
The console should now be showing the following text:
My name is Monty Python.
Note: no newlines have been sent to the output
The string assigned to the end keyword argument an be of any length. Experiment if you want.
The print() function - the keyword arguments
We've said previously that the print() function separates its outputted arguments with spaces. This behaviour can be changed, too.
The keyword argument that can do this is named sep (like separator)
Look at the code in the editor and run it.
The sep argument delivers the following results:
My-name-is-Monty-Python.
The print() function now uses a dash, instead of a space, to separate the outputted arguments.
Note: the sep argument's value may be an empty string, too. Try it for yourself.