As there is a difference between print a value or returning something from the function. You are just printing in the function and not returning any value from the function. So if the function is not returning anything, that can't be assigned to the variable... executing the function with myfunc() will only print the value to the terminal.. In case you want to store the value to a variable, you need to return it from the function. :)
def myfunc():
print("Helloo")
b = myfunc()
--> hellloo
b = myfunc
b
--> <function __main__.hello()>
b()
--> hellloo
def myfucn():
return("hellloo")
b = hello()
b
--> hellloo'