1 – Where will the object inside a function go when i call it ?
2 – Will the object go the the print statement to print or when i call the function will directly go to the terminal to be shown on the screen ?
def myname():
return 'hello world'
print(myname())
>Solution :
The function does not print anything on its own. It is called, and after its execution it outputs a 'hello world' to whatever called it. This value is then passed as an input to print, which causes it to show up on stdout