I am a little confused why the return statement won't work if I'm calling a function but will when I am printing it. Below is the example of code I worked with.
def get_favorite_food():
food = input("What's your favorite food?")
return 'Your favorite food' + ' ' + food + ' ' + 'is ready!'
When I try to run:
get_favorite_food()
>>>
Whats your favorite food?Macaroni
Compared to:
print(get_favorite_food())
>>>
Whats your favorite food?Macaroni
Your favorite food Macaroni is ready!
I apologize if I am using incorrect phrasing in my question. Please correct me so I could rephrase the question for myself and others!