Author:headsen Chen
Date:2018-03-21 15:12:09
Notice:created by Headsen Chen himself and not allowed to copy, or your count law questions.
1, the difference between the print function name and the execution process of the print functions:
============= "
Summary: Print the function's name print (a), and the result is that the memory address of the functional is printed out.
Print function execution: print (A ()), printing the function of the execution of the print part of the program, and finally the return of the contents of the print, there is no function to define return print none.
2, the function content body executes:
============= "
3, execute in return of the function:
============= "
Summary: When a function executes, the program also executes normally when the return content of the function is an executable program. However, the concept of the return value at this point is to print the printed part of the program and print the return value of the function, and return none if the return value is not defined
4, print the function name (essentially, the memory address that corresponds to the print variable name: That is, the memory address of the content body corresponding to the function)
============= "
return a (): Even though this return is a (), the memory address of two functions is still printed because the B () function is not called
============= "
5, the contents of return in the function is a function execution problem in the case of constants and variables (executable functions)
Return is a constant: because the B () function is empty. And a of return is a variable, which is a memory address
============= "
Return is a variable (executable function), then when the B function is run, the body of the B function and the program in return will run, the effect is as follows:
============= "
Return and execution of a return in Python