None is Python’s special value for the absence of a value. For example, a new pet may not have a name yet. None is an object with the type NoneType; it is different from the string "None". section 5.2
Functions use None when they finish without an explicit return statement. A function may print a message for the user while still returning None to the code that called it. section 21.2
Printing versus returning
In the example, say_name("Dora") prints Dora but produces no visible returned result. show_kid("Ellie") prints nothing because it only returns a value. print(say_name("Frank")) prints Frank and then None, while print(show_kid("Gus")) prints Gus. The function call supplies None in the first case because say_name has no return statement. section 21.2
Listing 21.5. Function with and without a return
def say_name(kid): #1
print(kid) #2
def show_kid(kid): #3
return kid #4
say_name("Dora") #5
show_kid("Ellie") #6
print(say_name("Frank")) #7
print(show_kid("Gus")) #8
Compare a function that prints with one that returns, then trace what appears when each call is made directly or passed to print. section 21.2



