This function, when printed, outputs 7 but when called, does not output anything. Can someone please explain why this is happening?
def myfunc(x, y):
return (x+y)
myfunc(3,4)
This does not output anything. But if I write print(myfunc(3,4))
, the output is 7
. How does this work?