What's this?
What I learned
I became curious about this topic when solving the university's quiz.
Below are the outputs of several sample patterns.
From this, I realize that Python outputs "None" automatically if no value is designated to return.
def pass_with_no_return(): pass def return_none(): return None def return_return(): return # whether those functions can work pass_with_no_return() # pass return_none() # pass return_return() # pass # what value those functions output print("pass_with_no_return: ", pass_with_no_return()) # => pass_with_no_return: None print("reutrn_none: ", return_none()) # => reutrn_none: None print("return_return: ", return_return()) # => return_return: None