Lets think more about how to marry Dolciani type math functions with the mundane workaday print( ), called a function by those who use it.
>>> print("Hello","world") Hello world
What's interesting about computer based math is you have a more complicated geography than just a piece of paper. One has an interactive surface, or surfaces listing instructions. Where do results display? We have left the simple ecosystem of paper and pencil.
The print( ) function is defined to send "strings" to "the console". A "string" is a type of object, like an integer or floating point number. Math already focuses on objects having type. An object of the triangle type has three angles, while an object of the integer type may engage in (or "has") various binary operations with other integers.
Focusing on "the console" for a sec: why don't mathematicians have to care about their media more, like artists? Why is the notation so unaware of "devices"? One could say a musical score is unaware of instruments, in the sense that the instrument is already assumed. On the other hand, music notation is quite instrument-aware and knows of geography. Orchestras have left and right. Music has location.
School math textbooks already assume an environment of workbook, notebook, showing work, answers, doing exercises. Published math does have to worry about location in other respects. In Wolfram's 'A New Kind of Science' we find meticulous use of figure and page numbers to keep the reader oriented.
Mathematica may then be added, and the full technology of a computer keyboard and console (i/o devices).
Here the function has been modified, not just by different string inputs, but by what's called a keyword argument. str() is actually another function-like piece of notation, in that it may be imagined to 'return' (stand for, evaluate to) an 'empty string' (like an empty set, but a string object).
sep is short for "separator" and here we see the effect: "Education" and "Mafia" come out conjoined, as one string, because the default separator, a single space, has been over-written by the new value, str().
Do we have a domain and range, ala Dolciani? I would argue that we do. Mathematics has its conditionals. "Do this if x is negative", "do that if x is positive".
The sep argument may be seen as providing a rule, whether explicitly invoked or not. The full explanation of print( ) requires attention to this rule.
print( ) also has an end= option, which may be used to govern how a the printed string ends, by default with a new line, and a file= option, for sending strings somewhere else besides the console.
Is print( ) still a function then, in the mathematical sense?
I would argue yes, in that the inputs determine the output. One may model its behavior in terms of (domain, range) pairs, or (before, after) if thinking in terms of time.
A function is like a verb between two states, an alias for a transformation. Mathematics should not pretend innocence of a time dimension, this late in the game.
Obviously print( ) is but one of a small vocabulary of functions we might start with. Of course we will be defining our own functions quite soon, using any pre-defined functions as available grist, as components.
Our functions will grow quite sophisticated, like biological creatures, and will then morph, evolve, into other types of object, some of which "eat" (consume) arguments, just as functions do.