whenever you use python console to use verify example codes, then for each line of the code that are entered at each instant, python console responds to that line code, which can be either >>> "Hi" or >>> print("Hi"), here the responds is same for both codes that is Hi, though the reasons behind for those responses are not same.
in python console responds by outputing Hi that python console received Hi text value at the end of the execution of that line code.
python console responds that it is displaying Hi.
Now, if we write those two line codes in python script file, and execute that python file in python console, like,
Let example.python be the file, and the code content be as follows:
What output do you see when executing the python scripting file through python console?
You will see only one Hi, instead of two Hi.
The reason is because while executing through python file, you will see outputs of what the python file code wants display through function like print(), all other intermediate responses that are received by python console are not displayed, which is not the case when you directly enter line codes in the python console, where intermediate responses are default.
Let us look at another closely related example from newer perspective.
Try this two line of codes directly in python console and also through the python scripting file. And reply.
Hint: look out for the respond for >>> message="Hi" while directly entering in python console... reply your observation....