In the first cell, you defined the function and assigned 3 variables. In the second, you run your function 3 times, and your function implementation includes exactly printing a string with the insertinon of the argument in it. Hence, for each 3 arguments the results were printed.
The value of
py would have been printed in the first cell, if after
py='Python' you inserted
py on the last line.
You were expecting the last line to give an output in Jupyter notebook. But it was an assignment statement only. It wouldn’t give any output. If you are planning to print it, use only the variable name.
Or else you have to call the function like you did in the next cell.
Thanks , @jithins123