What is the role of return in def greet(name): return f"Hello, {name}!"?
return
def greet(name): return f"Hello, {name}!"
It sends the constructed greeting back to the caller so it can be stored or used.
It imports greet from another module.
greet
It always prints the greeting directly and returns no value.
It creates the name parameter before the function is called.
name