I ran into something different today. Consider this simple function:
def hi():
return \'hi\'
If I call it in a Python shell,
Most interactive shells use a REPL loop - read-eval-print.
They read your input. They evaluate it. And they print the result.
Non-function examples are (using the ipython shell):
In [135]: 3+3
Out[135]: 6 # result of a math operation
In [136]: x=3 # no result from an assignment
In [137]: x
Out[137]: 3 # evaluate the variable, and print the result - its value